Start dual running with "areas" and "names"

For the public API we actually receive a "name" instead of an ID,
which we also want to start sending from the Admin app.

Unlike IDs, which aren't really used anywhere, we want the names
to display the alerts on gov.uk/alerts.
This commit is contained in:
Ben Thorner
2021-08-25 15:53:05 +01:00
parent 8f39d476bd
commit 023a06d5fb
2 changed files with 4 additions and 1 deletions

View File

@@ -70,6 +70,9 @@ def create_broadcast():
'areas': [
area['name'] for area in broadcast_json['areas']
],
'names': [
area['name'] for area in broadcast_json['areas']
],
'simple_polygons': polygons.smooth.simplify.as_coordinate_pairs_long_lat,
},
status=BroadcastStatusType.PENDING_APPROVAL,