mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-05 10:42:41 -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:
@@ -25,7 +25,7 @@ from notifications_utils.recipients import (
|
||||
|
||||
from app import ma
|
||||
from app import models
|
||||
from app.models import ServicePermission, BROADCAST_TYPE
|
||||
from app.models import ServicePermission
|
||||
from app.dao.permissions_dao import permission_dao
|
||||
from app.utils import DATETIME_FORMAT_NO_TIMEZONE, get_template_instance
|
||||
|
||||
@@ -242,14 +242,7 @@ class ServiceSchema(BaseSchema, UUIDsAsStringsMixin):
|
||||
return service.allowed_broadcast_provider
|
||||
|
||||
def _get_broadcast_channel(self, service):
|
||||
# TODO: Once we've migrated data so that all broadcast services have `service.broadcast_channel`
|
||||
# set then we can remove this logic and related tests and instead just return
|
||||
# `service.broadcast_channel`. For the moment though, as we have some services with the broadcast
|
||||
# permission that do not have a row in the service_broadcast_settings table, we need to hardcode
|
||||
# this in here to give them a default that the admin app can use
|
||||
if BROADCAST_TYPE in self.service_permissions(service):
|
||||
return service.broadcast_channel if service.broadcast_channel else "test"
|
||||
return None
|
||||
return service.broadcast_channel
|
||||
|
||||
def get_letter_logo_filename(self, service):
|
||||
return service.letter_branding and service.letter_branding.filename
|
||||
|
||||
Reference in New Issue
Block a user