Start dual running with "areas" and (area) "ids"

This is necessary until:

- The Admin app is using the new "areas(_2)" format to store and
retrieve data.

- We've migrated all existing broadcast messages to use the new
format.

Note that "areas" / "ids" isn't actually used for anything except
printing out the PagerDuty message - it's not sent to the proxy [1].

[1]: 6edc6c70aa/app/celery/broadcast_message_tasks.py (L190-L193)
This commit is contained in:
Ben Thorner
2021-08-25 15:48:09 +01:00
parent fd7ebbebb0
commit 8f39d476bd
6 changed files with 35 additions and 23 deletions

View File

@@ -1146,7 +1146,7 @@ def create_broadcast_message(
starts_at=starts_at,
finishes_at=finishes_at,
created_by_id=created_by.id if created_by else service.created_by_id,
areas=areas or {'areas': [], 'simple_polygons': []},
areas=areas or {'areas': [], 'ids': [], 'simple_polygons': []},
content=content,
stubbed=stubbed
)