mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-26 01:03:41 -04:00
Make set_as_broadcast_service use a single DB commit
We don't want things in a half state if there is an error during the method. Therefore, we move it all into a single function that is wrapped in a transaction. Note, we copy the approach of https://github.com/alphagov/notifications-api/blob/master/app/dao/services_dao.py#L293 by having a single new dao function that does all the DB work.
This commit is contained in:
@@ -37,7 +37,6 @@ from app.models import (
|
||||
INBOUND_SMS_TYPE,
|
||||
NOTIFICATION_RETURNED_LETTER,
|
||||
UPLOAD_LETTERS,
|
||||
ServiceBroadcastSettings,
|
||||
)
|
||||
from tests import create_authorization_header
|
||||
from tests.app.db import (
|
||||
|
||||
Reference in New Issue
Block a user