Merge pull request #3877 from alphagov/no-none-providers

Stop checking for allowed_broadcast_provider being None
This commit is contained in:
Katie Smith
2021-05-11 16:40:22 +01:00
committed by GitHub
5 changed files with 3 additions and 36 deletions

View File

@@ -2321,7 +2321,7 @@ class ServiceBroadcastAccountTypeField(GovukRadiosField):
if broadcast_channel:
account_type = "live" if live else "training"
account_type += f"-{broadcast_channel}"
if allowed_broadcast_provider and allowed_broadcast_provider != 'all':
if allowed_broadcast_provider != 'all':
account_type += f"-{allowed_broadcast_provider}"
self.data = account_type

View File

@@ -435,7 +435,7 @@
Off
{% else %}
{% if current_service.live and current_service.broadcast_channel == "severe" %}Live{% endif %}
{% if current_service.live and current_service.broadcast_channel == "test" %}Test {% if current_service.allowed_broadcast_provider and current_service.allowed_broadcast_provider != "all" %}({{ current_service.allowed_broadcast_provider|format_mobile_network }}){% else %}(All networks){% endif %}{%endif%}
{% if current_service.live and current_service.broadcast_channel == "test" %}Test {% if current_service.allowed_broadcast_provider != "all" %}({{ current_service.allowed_broadcast_provider|format_mobile_network }}){% else %}(All networks){% endif %}{%endif%}
{% if not current_service.live%}Training {% endif%}
{% endif %}
{% endcall %}

View File

@@ -25,7 +25,7 @@
{% else %}
<span class="navigation-service-type navigation-service-type--live">Live
{% endif %}
{% if current_service.allowed_broadcast_provider and current_service.allowed_broadcast_provider != "all" %}
{% if current_service.allowed_broadcast_provider != "all" %}
({{ current_service.allowed_broadcast_provider }})
{% endif %}
</span>