@@ -268,14 +268,16 @@ class BasicWorkflow(object):
|
|||||||
if heaviest_flag:
|
if heaviest_flag:
|
||||||
last_status = heaviest_flag.status
|
last_status = heaviest_flag.status
|
||||||
if last_status.code.startswith('publishing_'):
|
if last_status.code.startswith('publishing_'):
|
||||||
flags = event.flags.filter(status__code='accepted')
|
flags = []
|
||||||
flags.append(heaviest_flag)
|
flags += event.flags.filter(status__code='accepted')
|
||||||
|
flags += heaviest_flag
|
||||||
elif last_status.code.startswith('published_'):
|
elif last_status.code.startswith('published_'):
|
||||||
|
flags = []
|
||||||
if event.flags.filter(status__code='publishing').exists():
|
if event.flags.filter(status__code='publishing').exists():
|
||||||
flags = event.flags.filter(status__code='publishing')
|
flags += event.flags.filter(status__code='publishing')
|
||||||
else:
|
else:
|
||||||
flags = event.flags.filter(status__code='accepted')
|
flags += event.flags.filter(status__code='accepted')
|
||||||
flags.append(heaviest_flag)
|
flags += heaviest_flag
|
||||||
elif last_status.code.startswith('clear'):
|
elif last_status.code.startswith('clear'):
|
||||||
flags = [heaviest_flag]
|
flags = [heaviest_flag]
|
||||||
flags += event.flags.filter(status__code__in=('canceled', 'realized'))
|
flags += event.flags.filter(status__code__in=('canceled', 'realized'))
|
||||||
|
|||||||
Reference in New Issue
Block a user