mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-22 16:31:15 -05:00
Remove hardcoded default to use test channel
There is no need for a default now as every broadcast service has set on it which broadcast channel to use.
This commit is contained in:
@@ -140,10 +140,6 @@ def send_broadcast_provider_message(self, broadcast_event_id, provider):
|
||||
for polygon in broadcast_event.transmitted_areas["simple_polygons"]
|
||||
]
|
||||
|
||||
channel = "test"
|
||||
if broadcast_event.service.broadcast_channel:
|
||||
channel = broadcast_event.service.broadcast_channel
|
||||
|
||||
cbc_proxy_provider_client = cbc_proxy_client.get_proxy(provider)
|
||||
|
||||
try:
|
||||
@@ -156,7 +152,7 @@ def send_broadcast_provider_message(self, broadcast_event_id, provider):
|
||||
areas=areas,
|
||||
sent=broadcast_event.sent_at_as_cap_datetime_string,
|
||||
expires=broadcast_event.transmitted_finishes_at_as_cap_datetime_string,
|
||||
channel=channel
|
||||
channel=broadcast_event.service.broadcast_channel
|
||||
)
|
||||
elif broadcast_event.message_type == BroadcastEventMessageType.UPDATE:
|
||||
cbc_proxy_provider_client.update_and_send_broadcast(
|
||||
@@ -174,7 +170,7 @@ def send_broadcast_provider_message(self, broadcast_event_id, provider):
|
||||
# but we are relying on service channels changing almost never, and not mid incident
|
||||
# We may consider in the future, changing this such that we store the channel a broadcast was
|
||||
# sent on on the broadcast message itself and pick the value from there instead of the service
|
||||
channel=channel
|
||||
channel=broadcast_event.service.broadcast_channel
|
||||
)
|
||||
elif broadcast_event.message_type == BroadcastEventMessageType.CANCEL:
|
||||
cbc_proxy_provider_client.cancel_broadcast(
|
||||
|
||||
Reference in New Issue
Block a user