Skip to content

Commit

Permalink
fix: Added pin data handling when importing workflow. (#3698)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgrozav authored Jul 13, 2022
1 parent 4d71d40 commit 714b152
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/editor-ui/src/Interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ export interface IWorkflowDataUpdate {
settings?: IWorkflowSettings;
active?: boolean;
tags?: ITag[] | string[]; // string[] when store or requested, ITag[] from API response
pinData?: PinData;
}

export interface IWorkflowTemplate {
Expand Down
4 changes: 4 additions & 0 deletions packages/editor-ui/src/views/NodeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1294,6 +1294,10 @@ export default mixins(
});
});
if (workflowData.pinData) {
this.$store.commit('setWorkflowPinData', workflowData.pinData);
}
const tagsEnabled = this.$store.getters['settings/areTagsEnabled'];
if (importTags && tagsEnabled && Array.isArray(workflowData.tags)) {
const allTags: ITag[] = await this.$store.dispatch('tags/fetchAll');
Expand Down

0 comments on commit 714b152

Please sign in to comment.