Fix handling of default workflow mode when projects not active

pull/2763/head
Nick O'Leary 2021-01-08 15:05:34 +00:00
parent 0f7d185a61
commit 5489bd37c9
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
1 changed files with 7 additions and 5 deletions

View File

@ -580,12 +580,14 @@ function saveFlows(flows, user) {
}
return util.writeFile(flowsFullPath, flowData, flowsFileBackup).then(() => {
var gitSettings = getUserGitSettings(user) || {};
if (activeProject) {
var workflowMode = (gitSettings.workflow||{}).mode || settings.editorTheme.projects.workflow.mode;
if (activeProject && workflowMode === 'auto') {
if (workflowMode === 'auto') {
return activeProject.stageFile([flowsFullPath, credentialsFile]).then(() => {
return activeProject.commit(user,{message:"Update flow files"})
})
}
}
});
}