From e4678eb9f5581a18be6e98c3b01d97fb847a099e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Fri, 16 Jul 2021 11:23:38 +0200 Subject: [PATCH] backoffice: adapt inspect page to note when a function is the default (#55632) --- wcs/backoffice/management.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wcs/backoffice/management.py b/wcs/backoffice/management.py index 8d17040cb..53003a9a2 100644 --- a/wcs/backoffice/management.py +++ b/wcs/backoffice/management.py @@ -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: