mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
fix: Remove foreign credentials when copying nodes or duplicating workflow (#4880)
* fix: Remove foreign credentials when copying nodes or duplicating workflow * chore: fix linting issue
This commit is contained in:
@@ -69,6 +69,7 @@ const createEmptyWorkflow = (): IWorkflowDb => ({
|
||||
tags: [],
|
||||
pinData: {},
|
||||
versionId: '',
|
||||
usedCredentials: [],
|
||||
});
|
||||
|
||||
export const useWorkflowsStore = defineStore(STORES.WORKFLOWS, {
|
||||
@@ -269,6 +270,7 @@ export const useWorkflowsStore = defineStore(STORES.WORKFLOWS, {
|
||||
},
|
||||
|
||||
setUsedCredentials(data: IUsedCredential[]) {
|
||||
this.workflow.usedCredentials = data;
|
||||
this.usedCredentials = data.reduce<{ [name: string]: IUsedCredential }>((accu, credential) => {
|
||||
accu[credential.id!] = credential;
|
||||
return accu;
|
||||
|
||||
Reference in New Issue
Block a user