backoffice: adapt inspect page to note when a function is the default (#55632)

This commit is contained in:
Frédéric Péters 2021-07-16 11:23:38 +02:00
parent 7bfcbcdd37
commit e4678eb9f5
1 changed files with 4 additions and 1 deletions

View File

@ -3636,7 +3636,10 @@ class FormBackOfficeStatusPage(FormStatusPage):
acting_role = get_publisher().user_class.get(acting_role_id.split(':')[1])
else:
acting_role = get_publisher().role_class.get(acting_role_id)
acting_role_names.append(acting_role.name)
if key in (self.filled.workflow_roles or {}):
acting_role_names.append(acting_role.name)
else:
acting_role_names.append('%s (%s)' % (acting_role.name, _('default')))
except KeyError:
acting_role_names.append('%s (%s)' % (acting_role_id, _('deleted')))
if acting_role_names: