Skip to content

Commit

Permalink
Call PublishAsync instead of using VersionOptions. (OrchardCMS#3420)
Browse files Browse the repository at this point in the history
  • Loading branch information
jptissot authored and sebastienros committed Apr 1, 2019
1 parent ff4673b commit b19eda5
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,12 @@ public async override Task<ActivityExecutionResult> ExecuteAsync(WorkflowExecuti
((JObject)contentItem.Content).Merge(propertyObject);
}

var versionOptions = Publish ? VersionOptions.Published : VersionOptions.Draft;
await ContentManager.CreateAsync(contentItem, versionOptions);
await ContentManager.CreateAsync(contentItem);

if (Publish)
{
await ContentManager.PublishAsync(contentItem);
}

workflowContext.LastResult = contentItem;
workflowContext.CorrelationId = contentItem.ContentItemId;
Expand Down

0 comments on commit b19eda5

Please sign in to comment.