mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-11 18:37:33 -04:00
Support new broadcasts (without area IDs)
Previously we relied on the API defaulting this field to an empty array [1], but that conflicts with using it to decide whether a broadcast is custom or created in this app. [1]: https://github.com/alphagov/notifications-api/blob/3779146cc51385327cef90390af1f62db983919f/app/models.py#L2342
This commit is contained in:
@@ -111,7 +111,7 @@ class BroadcastMessage(JSONModel):
|
||||
|
||||
@property
|
||||
def area_ids(self):
|
||||
return self._dict['areas']['ids']
|
||||
return self._dict['areas'].get('ids', [])
|
||||
|
||||
@area_ids.setter
|
||||
def area_ids(self, value):
|
||||
|
||||
Reference in New Issue
Block a user