Skip to content

Commit

Permalink
fix: Fetch credentials on workflows view to include in duplicated wor…
Browse files Browse the repository at this point in the history
…kflows (#5532)

fix: fetch credentials on workflows view to include in duplicated workflows
  • Loading branch information
alexgrozav authored Mar 9, 2023
1 parent 71c349b commit 493f7a1
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/editor-ui/src/views/WorkflowsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ import { useUIStore } from '@/stores/ui';
import { useSettingsStore } from '@/stores/settings';
import { useUsersStore } from '@/stores/users';
import { useWorkflowsStore } from '@/stores/workflows';
import { useCredentialsStore } from '@/stores/credentials';
import { usePostHog } from '@/stores/posthog';
type IResourcesListLayoutInstance = Vue & { sendFiltersTelemetry: (source: string) => void };
Expand Down Expand Up @@ -170,7 +171,13 @@ const WorkflowsView = mixins(showMessage, debounceHelper).extend({
};
},
computed: {
...mapStores(useSettingsStore, useUIStore, useUsersStore, useWorkflowsStore),
...mapStores(
useSettingsStore,
useUIStore,
useUsersStore,
useWorkflowsStore,
useCredentialsStore,
),
currentUser(): IUser {
return this.usersStore.currentUser || ({} as IUser);
},
Expand Down Expand Up @@ -229,6 +236,8 @@ const WorkflowsView = mixins(showMessage, debounceHelper).extend({
this.workflowsStore.fetchActiveWorkflows(),
]);
this.credentialsStore.fetchAllCredentials();
// If the user has no workflows and is not participating in the demo experiment,
// redirect to the new workflow view
if (!this.isDemoTest && this.allWorkflows.length === 0) {
Expand Down

0 comments on commit 493f7a1

Please sign in to comment.