workflows: get list of manual actions in case of undefined roles (#43491)

This commit is contained in:
Frédéric Péters 2020-05-30 10:35:53 +02:00
parent 5b6d096623
commit dcb3624834
1 changed files with 2 additions and 2 deletions

View File

@ -1673,8 +1673,8 @@ class WorkflowStatus(object):
if not action.identifier:
continue
roles = action.by
functions = [x for x in roles if x in self.parent.roles]
roles = [x for x in roles if x not in self.parent.roles]
functions = [x for x in roles if x in (self.parent.roles or [])]
roles = [x for x in roles if x not in (self.parent.roles or [])]
if functions or roles:
actions.append({'action': StatusAction(action), 'roles': roles, 'functions': functions})
return actions