mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 18:31:13 -05:00
Shorten name of broadcast utility function
This is doing more than just validating and updating an is about to do even more. Saying "update" is broad enough to cover the others.
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