#19853: Preventing workflows from requiring a target content item

Work Item: 19853

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2013-07-07 19:31:07 -07:00
parent 24f66bb022
commit 3f27ec9ef4

View File

@@ -63,7 +63,7 @@ namespace Orchard.Workflows.Services {
// it's important to return activities at this point as a workflow could be awaiting
// on several ones. When an activity is restarted, all the other ones of the same workflow are cancelled.
awaitingActivities.AddRange(_awaitingActivityRepository.Table.Where(
x => x.ActivityRecord.Name == name && x.ActivityRecord.Start == false && x.WorkflowRecord.ContentItemRecord == target.ContentItem.Record
x => x.ActivityRecord.Name == name && x.ActivityRecord.Start == false && (target.ContentItem == null || (x.WorkflowRecord.ContentItemRecord == target.ContentItem.Record))
).ToList()
);