mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 02:51:14 +00:00
fix(editor): Respect project id and parent folder for callouts (no-changelog) (#19318)
This commit is contained in:
@@ -491,7 +491,7 @@ async function fetchAndSetParentFolder(folderId?: string) {
|
||||
}
|
||||
|
||||
async function fetchAndSetProject(projectId: string) {
|
||||
if (!projectsStore.currentProject) {
|
||||
if (projectsStore.currentProject?.id !== projectId) {
|
||||
const project = await projectsStore.fetchProject(projectId);
|
||||
projectsStore.setCurrentProject(project);
|
||||
}
|
||||
@@ -614,9 +614,15 @@ async function openTemplateFromWorkflowJSON(workflow: WorkflowDataWithTemplateId
|
||||
isBlankRedirect.value = true;
|
||||
const templateId = workflow.meta.templateId;
|
||||
const parentFolderId = route.query.parentFolderId as string | undefined;
|
||||
|
||||
if (projectsStore.currentProjectId) {
|
||||
await fetchAndSetProject(projectsStore.currentProjectId);
|
||||
}
|
||||
await fetchAndSetParentFolder(parentFolderId);
|
||||
|
||||
await router.replace({
|
||||
name: VIEWS.NEW_WORKFLOW,
|
||||
query: { templateId, parentFolderId },
|
||||
query: { templateId, parentFolderId, projectId: projectsStore.currentProjectId },
|
||||
});
|
||||
|
||||
await importTemplate({
|
||||
|
||||
Reference in New Issue
Block a user