Stop defaulting "ids" to an empty array

This is so we can distinguish custom broadcasts in the Admin app
[1]. I've also extended the POST test for custom broadcasts to
check we're correctly reading data for "names", as this wasn't
being tested previously.

[1]: 411fda81c0
This commit is contained in:
Ben Thorner
2021-09-06 12:43:46 +01:00
parent dd41cf854c
commit 59d0ab4f65
3 changed files with 2 additions and 2 deletions

View File

@@ -2338,7 +2338,6 @@ class BroadcastMessage(db.Model):
def serialize(self):
areas = dict(self.areas)
areas["simple_polygons"] = areas.get("simple_polygons", [])
areas["ids"] = areas.get("ids", [])
return {
'id': str(self.id),