Commit Graph

8 Commits

Author SHA1 Message Date
Aditi Anand
df2a590f1a Merge branch 'notify-api-869' into aanand-sqlalchemy-version-update 2024-04-24 16:11:03 -04:00
Kenneth Kehl
ebdb78e52e reformat up to latest version of black 2024-04-01 15:12:33 -07:00
Aditi Anand
385ec3583f Initial commit for sqlalchemy2.0 migration 2024-03-13 12:42:11 -04:00
Cliff Hill
1157f5639d black, isort, flake8
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
2023-12-08 21:43:52 -05:00
Kenneth Kehl
1ecb747c6d reformat 2023-08-29 14:54:30 -07:00
Kenneth Kehl
4d090ed9ef code review feedback 2023-07-14 14:59:23 -07:00
Kenneth Kehl
e6077c187c notify-api-91 sanitize SQL inputs against injection 2023-07-14 09:07:23 -07:00
David McDonald
ce2f550387 Backfill services_broadcast_settings table
At the moment, we currently have broadcast services that have the
'broadcast' service permission in the DB but don't have a corresponding
row in the service_broadcast_settings table. It's important to give them
a row in this table because this will control which broadcast channel
their messages will go out on. All broadcast services will be expected
to have this row so we can then remove hardcoded defaults from our code
that currently set what channel a message should go out on.

Whilst, when this gets deployed, we will have released
https://github.com/alphagov/notifications-admin/pull/3794, which means
that when a service setting is changed via that form, they will get the
corresponding row in the service_broadcast_settings form, we don't want
to ask every developer to go and fill in this form for every service on
their local dev environment and also do the same to every service we
have in preview, staging and production. Therefore a migration is the
best way to backfill the data.

Note, I made the decision that a service that is in trial mode will be
given the 'severe' channel. This is because this is what most trial mode
services should have. Only the MNOs would ever really have a trial mode
service on the test channel. And given they are in trial mode, it is not
too risky to give them the 'severe' channel.

For services that are live though, although there are no services in
production that have the broadcast permission and are live, it is not
worth taking that risk and accidently setting that service to send an
alert out on the 'severe' channel. We play it say by choosing 'test'.
2021-02-23 17:15:05 +00:00