mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-23 15:56:45 -04:00
Add broadcast channel to service schema
This will show which channel is configured, if any, for a service. It mimics what we are doing for the `allowed_broadcast_provider`.
This commit is contained in:
@@ -236,10 +236,14 @@ class ServiceSchema(BaseSchema, UUIDsAsStringsMixin):
|
||||
override_flag = False
|
||||
go_live_at = field_for(models.Service, 'go_live_at', format=DATETIME_FORMAT_NO_TIMEZONE)
|
||||
allowed_broadcast_provider = fields.Method(dump_only=True, serialize='_get_allowed_broadcast_provider')
|
||||
broadcast_channel = fields.Method(dump_only=True, serialize='_get_broadcast_channel')
|
||||
|
||||
def _get_allowed_broadcast_provider(self, service):
|
||||
return service.allowed_broadcast_provider
|
||||
|
||||
def _get_broadcast_channel(self, service):
|
||||
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