mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-11 02:23:19 -04:00
Send api the broadcast provider restriction of 'all', not 'None'
We're replacing the value of None with the value of all. API has been updated to accept both values (https://github.com/alphagov/notifications-api/pull/3233/commits/1767535defd117e1d39d3ab911f01477787eef65) so this change starts sending notifications-api the value of "all".
This commit is contained in:
+1
-1
@@ -2334,7 +2334,7 @@ class ServiceBroadcastAccountTypeField(GovukRadiosField):
|
||||
split_values = self.data.split("-")
|
||||
self.service_mode = split_values[0]
|
||||
self.broadcast_channel = split_values[1]
|
||||
self.provider_restriction = split_values[2] if len(split_values) == 3 else None
|
||||
self.provider_restriction = split_values[2] if len(split_values) == 3 else 'all'
|
||||
|
||||
|
||||
class ServiceBroadcastAccountTypeForm(StripWhitespaceForm):
|
||||
|
||||
@@ -5524,9 +5524,9 @@ def test_get_service_set_broadcast_account_type_has_radio_selected_for_broadcast
|
||||
@pytest.mark.parametrize(
|
||||
'value,service_mode,broadcast_channel,allowed_broadcast_provider',
|
||||
[
|
||||
("training-test", "training", "test", None),
|
||||
("training-test", "training", "test", "all"),
|
||||
("live-test-vodafone", "live", "test", "vodafone"),
|
||||
("live-severe", "live", "severe", None),
|
||||
("live-severe", "live", "severe", "all"),
|
||||
]
|
||||
)
|
||||
def test_post_service_set_broadcast_account_type_posts_data_to_api_and_redirects(
|
||||
|
||||
Reference in New Issue
Block a user