mirror of
https://github.com/GSA/notifications-api.git
synced 2026-05-28 09:59:40 -04:00
Remove references to broadcast provider_restriction being None
None is not a value that is allowed any more.
This commit is contained in:
@@ -560,8 +560,7 @@ class Service(db.Model, Versioned):
|
||||
|
||||
def get_available_broadcast_providers(self):
|
||||
# There may be future checks here if we add, for example, platform admin level provider killswitches.
|
||||
# NOTE: We are in the middle of changing the value for all allowed_broadcast_provider from `None`to "all"
|
||||
if self.allowed_broadcast_provider and self.allowed_broadcast_provider != ALL_BROADCAST_PROVIDERS:
|
||||
if self.allowed_broadcast_provider != ALL_BROADCAST_PROVIDERS:
|
||||
return [x for x in current_app.config['ENABLED_CBCS'] if x == self.allowed_broadcast_provider]
|
||||
else:
|
||||
return current_app.config['ENABLED_CBCS']
|
||||
|
||||
@@ -6,7 +6,7 @@ service_broadcast_settings_schema = {
|
||||
"properties": {
|
||||
"broadcast_channel": {"enum": ["test", "severe"]},
|
||||
"service_mode": {"enum": ["training", "live"]},
|
||||
"provider_restriction": {"enum": [None, "three", "o2", "vodafone", "ee", "all"]}
|
||||
"provider_restriction": {"enum": ["three", "o2", "vodafone", "ee", "all"]}
|
||||
},
|
||||
"required": ["broadcast_channel", "service_mode", "provider_restriction"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user