🐛 Fix bug that it did delete static data when it did not change

This commit is contained in:
Jan Oberhauser 2019-10-15 16:10:28 +02:00
parent 99c0063cca
commit 7ff5721ea2

View file

@ -158,7 +158,7 @@ const hooks = (mode: WorkflowExecuteMode, workflowData: IWorkflowBase, execution
workflowExecuteAfter: [
async (fullRunData: IRun, newStaticData: IDataObject): Promise<void> => {
try {
if (mode !== 'manual' && WorkflowHelpers.isWorkflowIdValid(workflowData.id as string) === true) {
if (mode !== 'manual' && WorkflowHelpers.isWorkflowIdValid(workflowData.id as string) === true && newStaticData) {
// Workflow is saved so update in database
try {
await WorkflowHelpers.saveStaticDataById(workflowData.id as string, newStaticData);