@@ -266,23 +266,21 @@ class BasicWorkflow(object):
|
||||
|
||||
heaviest_flag = event.flags.order_by('status').last()
|
||||
if heaviest_flag:
|
||||
flags = []
|
||||
last_status = heaviest_flag.status
|
||||
if last_status.code.startswith('publishing_'):
|
||||
flags = []
|
||||
flags += event.flags.filter(status__code='accepted')
|
||||
flags += heaviest_flag
|
||||
flags.append(heaviest_flag)
|
||||
elif last_status.code.startswith('published_'):
|
||||
flags = []
|
||||
if event.flags.filter(status__code='publishing').exists():
|
||||
flags += event.flags.filter(status__code='publishing')
|
||||
else:
|
||||
flags += event.flags.filter(status__code='accepted')
|
||||
flags += heaviest_flag
|
||||
flags.append(heaviest_flag)
|
||||
elif last_status.code.startswith('clear'):
|
||||
flags = [heaviest_flag]
|
||||
flags += event.flags.filter(status__code__in=('canceled', 'realized'))
|
||||
flags += event.flags.filter(status__code__in=('cleared', 'canceled', 'realized'))
|
||||
else:
|
||||
flags = [heaviest_flag]
|
||||
flags.append(heaviest_flag)
|
||||
|
||||
deferred_publishing = event.planned_publication_date and event.planned_publication_date > today
|
||||
add_publishing_date = False
|
||||
|
||||
Reference in New Issue
Block a user