mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-23 08:51:30 -05:00
We are in a weird situation where at the moment, we have services with the broadcast permission that do not have a row in the service_broadcast_settings table and therefore do not have defined whether they should send messages on the 'test' or 'severe' channel. We currently get around this when we send broadcast messages out as such: https://github.com/alphagov/notifications-api/blob/master/app/celery/broadcast_message_tasks.py#L51 We need to something equivalent for the broadcast channel that the API says the service is on. In time, when we have added a row in the service_broadcast_settings table for every service with the broadcast permission then we can remove both of these two hardcodings. Note, one option would have been to move the default of `test` on to the `Service` model rather than having it in both the broadcast_message_tasks file and the `ServiceSchema` class. However, I went for the quickest thing which was to add it here.
25 KiB
25 KiB