mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-16 10:12:32 -05:00
broadcasts: do not send description to cbc_proxy
"areas" and "simple_polygons" in "transmitted_areas" do not have the same length as an example, choosing the area "england" results in a single item in "areas" but many polygons in "simple_polygons" therefore zipping these two together gives a list of areas: * of length 1 * containing only new grimsby which is not what we want as the CBC does not care about the areaDesc field within CAP, we should omit it from the function invocation and delegate the contents of areaDesc to the CBC Proxy implementation Signed-off-by: Toby Lorne <toby.lornewelch-richards@digital.cabinet-office.gov.uk> Co-authored-by: Richard <richard.baker@digital.cabinet-office.gov.uk> Co-authored-by: David <david.mcdonald@digital.cabinet-office.gov.uk>
This commit is contained in:
@@ -19,11 +19,8 @@ def send_broadcast_event(broadcast_event_id):
|
||||
)
|
||||
|
||||
areas = [
|
||||
{"description": desc, "polygon": polygon}
|
||||
for desc, polygon in zip(
|
||||
broadcast_event.transmitted_areas["areas"],
|
||||
broadcast_event.transmitted_areas["simple_polygons"],
|
||||
)
|
||||
{"polygon": polygon}
|
||||
for polygon in broadcast_event.transmitted_areas["simple_polygons"]
|
||||
]
|
||||
|
||||
if broadcast_event.message_type == BroadcastEventMessageType.ALERT:
|
||||
|
||||
Reference in New Issue
Block a user