mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-02 07:01:30 -08:00
fix(editor): Load appropriate credentials in canvas V2 for new workflow (#12722)
Some checks are pending
Test Master / install-and-build (push) Waiting to run
Test Master / Unit tests (18.x) (push) Blocked by required conditions
Test Master / Unit tests (20.x) (push) Blocked by required conditions
Test Master / Unit tests (22.4) (push) Blocked by required conditions
Test Master / Lint (push) Blocked by required conditions
Test Master / Notify Slack on failure (push) Blocked by required conditions
Some checks are pending
Test Master / install-and-build (push) Waiting to run
Test Master / Unit tests (18.x) (push) Blocked by required conditions
Test Master / Unit tests (20.x) (push) Blocked by required conditions
Test Master / Unit tests (22.4) (push) Blocked by required conditions
Test Master / Lint (push) Blocked by required conditions
Test Master / Notify Slack on failure (push) Blocked by required conditions
This commit is contained in:
parent
1f43181360
commit
2020dc502f
|
@ -349,6 +349,8 @@ async function initializeRoute(force = false) {
|
||||||
if (!isAlreadyInitialized) {
|
if (!isAlreadyInitialized) {
|
||||||
historyStore.reset();
|
historyStore.reset();
|
||||||
|
|
||||||
|
await loadCredentials();
|
||||||
|
|
||||||
// If there is no workflow id, treat it as a new workflow
|
// If there is no workflow id, treat it as a new workflow
|
||||||
if (isNewWorkflowRoute.value || !workflowId.value) {
|
if (isNewWorkflowRoute.value || !workflowId.value) {
|
||||||
if (route.meta?.nodeView === true) {
|
if (route.meta?.nodeView === true) {
|
||||||
|
@ -359,8 +361,6 @@ async function initializeRoute(force = false) {
|
||||||
|
|
||||||
await initializeWorkspaceForExistingWorkflow(workflowId.value);
|
await initializeWorkspaceForExistingWorkflow(workflowId.value);
|
||||||
|
|
||||||
await loadCredentials();
|
|
||||||
|
|
||||||
void nextTick(() => {
|
void nextTick(() => {
|
||||||
nodeHelpers.updateNodesInputIssues();
|
nodeHelpers.updateNodesInputIssues();
|
||||||
nodeHelpers.updateNodesCredentialsIssues();
|
nodeHelpers.updateNodesCredentialsIssues();
|
||||||
|
@ -820,8 +820,8 @@ function onClickNodeAdd(source: string, sourceHandle: string) {
|
||||||
async function loadCredentials() {
|
async function loadCredentials() {
|
||||||
let options: { workflowId: string } | { projectId: string };
|
let options: { workflowId: string } | { projectId: string };
|
||||||
|
|
||||||
if (editableWorkflow.value) {
|
if (workflowId.value) {
|
||||||
options = { workflowId: editableWorkflow.value.id };
|
options = { workflowId: workflowId.value };
|
||||||
} else {
|
} else {
|
||||||
const queryParam =
|
const queryParam =
|
||||||
typeof route.query?.projectId === 'string' ? route.query?.projectId : undefined;
|
typeof route.query?.projectId === 'string' ? route.query?.projectId : undefined;
|
||||||
|
|
Loading…
Reference in a new issue