mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 18:01:08 -05:00
Remove support for old "areas" sub-field
All broadcasts with this field have now been migrated to use "ids". This also removes a few lines that were missed in previous PRs: - Added by mistake:fd7ebbebb0 (diff-045554136e1462693a6cbb6328b2e056a81e8b348e94575edd8f72b78c5da96eR115)- Missed removal:ec1171f85c (diff-045554136e1462693a6cbb6328b2e056a81e8b348e94575edd8f72b78c5da96eR110)
This commit is contained in:
@@ -2336,10 +2336,9 @@ class BroadcastMessage(db.Model):
|
||||
self._personalisation = encryption.encrypt(personalisation or {})
|
||||
|
||||
def serialize(self):
|
||||
# TEMPORARY: while we repurpose "areas"
|
||||
areas = dict(self.areas)
|
||||
areas["simple_polygons"] = areas.get("simple_polygons", [])
|
||||
areas["ids"] = areas.pop("areas", areas.get("ids", []))
|
||||
areas["ids"] = areas.get("ids", [])
|
||||
|
||||
return {
|
||||
'id': str(self.id),
|
||||
|
||||
Reference in New Issue
Block a user