fix(workflow): enable workflow per method (#1569)
Workflow needs to be enabled per method. `persistEntry` should only use it when persisting an unpublished entry, but must behave as if workflow were not enabled for publishing. This fixes a 2.0 regression.
This commit is contained in:
@ -385,6 +385,8 @@ class Backend {
|
||||
|
||||
const commitMessage = commitMessageFormatter(newEntry ? 'create' : 'update', config, { collection, slug: entryObj.slug, path: entryObj.path });
|
||||
|
||||
const useWorkflow = config.getIn(["publish_mode"]) === EDITORIAL_WORKFLOW;
|
||||
|
||||
const collectionName = collection.get("name");
|
||||
|
||||
/**
|
||||
@ -397,6 +399,7 @@ class Backend {
|
||||
parsedData,
|
||||
commitMessage,
|
||||
collectionName,
|
||||
useWorkflow,
|
||||
...updatedOptions
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user