mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 09:26:08 -05:00
Merge pull request #3497 from alphagov/broadcast-alert-earlier-181423293
Alert earlier when a broadcast is approved
This commit is contained in:
@@ -6,10 +6,8 @@ from notifications_utils.template import BroadcastMessageTemplate
|
||||
from sqlalchemy.orm.exc import MultipleResultsFound
|
||||
|
||||
from app import api_user, authenticated_service, redis_store
|
||||
from app.broadcast_message import utils as broadcast_utils
|
||||
from app.broadcast_message.translators import cap_xml_to_dict
|
||||
from app.broadcast_message.utils import (
|
||||
validate_and_update_broadcast_message_status,
|
||||
)
|
||||
from app.dao.broadcast_message_dao import (
|
||||
dao_get_broadcast_message_by_references_and_service_id,
|
||||
)
|
||||
@@ -121,7 +119,7 @@ def _cancel_or_reject_broadcast(references_to_original_broadcast, service_id):
|
||||
new_status = BroadcastStatusType.REJECTED
|
||||
else:
|
||||
new_status = BroadcastStatusType.CANCELLED
|
||||
validate_and_update_broadcast_message_status(
|
||||
broadcast_utils.update_broadcast_message_status(
|
||||
broadcast_message,
|
||||
new_status,
|
||||
api_key_id=api_user.id
|
||||
|
||||
Reference in New Issue
Block a user