mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-05 08:31:00 -04:00
Prefer cap_event to reference when referring to an alert
`reference` isn’t very human-friendly – the Environment Agency just supply a UUID in this field. The Environment Agency also populate the `<event>`` field with some human readable text, for example: > 013 Issue Severe Flood Warning EA (013 is an ‘area code’ which will be meaningful to the Flood Warning Service team) This commit changes the frontend to display the value of the `cap_event` field, if it’s present, which is where the API stores the value of the `<event>` field from the original CAP XML. *** Depends on: - [x] https://github.com/alphagov/notifications-api/pull/3344/files
This commit is contained in:
@@ -162,7 +162,7 @@ class BroadcastMessage(JSONModel):
|
||||
def reference(self):
|
||||
if self.template_id:
|
||||
return self._dict['template_name']
|
||||
return self._dict['reference']
|
||||
return self._dict['cap_event'] or self._dict['reference']
|
||||
|
||||
@property
|
||||
def template(self):
|
||||
|
||||
Reference in New Issue
Block a user