mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
Simplify network choice to optional radio buttons
Previously this field had to mimic the final hyphenated string of the broadcast account type, even though it was only used to select one of its components. The new, shorter choices make it easier to simplify the test for the POST request. I've also deleted a number of test cases for pre-selected radios. This functionality isn't critical, so we don't need to exhaustively test every single possible combination of values.
This commit is contained in:
@@ -355,21 +355,11 @@ def service_set_broadcast_network(service_id, broadcast_channel):
|
||||
if current_service.broadcast_channel == broadcast_channel:
|
||||
provider = current_service.allowed_broadcast_provider
|
||||
|
||||
if provider == 'all':
|
||||
form = ServiceBroadcastNetworkForm(
|
||||
broadcast_channel=broadcast_channel,
|
||||
all_networks=True,
|
||||
)
|
||||
else:
|
||||
form = ServiceBroadcastNetworkForm(
|
||||
broadcast_channel=broadcast_channel,
|
||||
all_networks=False,
|
||||
network=(
|
||||
current_service.live,
|
||||
current_service.broadcast_channel,
|
||||
provider,
|
||||
)
|
||||
)
|
||||
form = ServiceBroadcastNetworkForm(
|
||||
broadcast_channel=broadcast_channel,
|
||||
all_networks=provider == 'all',
|
||||
network=provider if provider != 'all' else None,
|
||||
)
|
||||
else:
|
||||
form = ServiceBroadcastNetworkForm(
|
||||
broadcast_channel=broadcast_channel
|
||||
|
||||
Reference in New Issue
Block a user