mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 05:59:44 -04:00
Include area names in data we send to API
These will be used as a fallback for display in gov.uk/alerts. It also helps to have them in the DB to aid in quickly identifying where an alert was sent, which is hard from the IDs. We will look at backfilling names for past alerts in future work.
This commit is contained in:
@@ -243,6 +243,7 @@ class BroadcastMessage(JSONModel):
|
||||
def _update_areas(self):
|
||||
self._update(areas_2={
|
||||
'ids': self.area_ids,
|
||||
'names': [area.name for area in self.areas],
|
||||
'simple_polygons': self.simple_polygons.as_coordinate_pairs_lat_long
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user