mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 19:11: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:
@@ -125,8 +125,10 @@ export default mixins(showMessage, workflowHelpers, restApi).extend({
|
||||
try {
|
||||
let workflowToUpdate: IWorkflowDataUpdate | undefined;
|
||||
if (currentWorkflowId !== PLACEHOLDER_EMPTY_WORKFLOW_ID) {
|
||||
const { createdAt, updatedAt, ...workflow } = await this.restApi().getWorkflow(this.data.id);
|
||||
const { createdAt, updatedAt, usedCredentials, ...workflow } = await this.restApi().getWorkflow(this.data.id);
|
||||
workflowToUpdate = workflow;
|
||||
|
||||
this.removeForeignCredentialsFromWorkflow(workflowToUpdate, this.credentialsStore.allCredentials);
|
||||
}
|
||||
|
||||
const saved = await this.saveAsNewWorkflow({
|
||||
|
||||
Reference in New Issue
Block a user