mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 00:07:02 -04:00
Rename helper method
This is ambiguous, as it's not used in a lot of the views.
There’s precendent for naming these kind of methods here:
06cc5b58c7/app/main/views/broadcast.py (L238)
This commit is contained in:
@@ -22,7 +22,7 @@ from app.models.broadcast_message import BroadcastMessage, BroadcastMessages
|
|||||||
from app.utils import service_has_permission, user_has_permissions
|
from app.utils import service_has_permission, user_has_permissions
|
||||||
|
|
||||||
|
|
||||||
def get_back_link_endpoint():
|
def _get_back_link_from_view_broadcast_endpoint():
|
||||||
return {
|
return {
|
||||||
'main.view_current_broadcast': '.broadcast_dashboard',
|
'main.view_current_broadcast': '.broadcast_dashboard',
|
||||||
'main.view_previous_broadcast': '.broadcast_dashboard_previous',
|
'main.view_previous_broadcast': '.broadcast_dashboard_previous',
|
||||||
@@ -402,7 +402,7 @@ def view_broadcast(service_id, broadcast_message_id):
|
|||||||
'views/broadcast/view-message.html',
|
'views/broadcast/view-message.html',
|
||||||
broadcast_message=broadcast_message,
|
broadcast_message=broadcast_message,
|
||||||
back_link=url_for(
|
back_link=url_for(
|
||||||
get_back_link_endpoint(),
|
_get_back_link_from_view_broadcast_endpoint(),
|
||||||
service_id=current_service.id,
|
service_id=current_service.id,
|
||||||
),
|
),
|
||||||
form=ConfirmBroadcastForm(
|
form=ConfirmBroadcastForm(
|
||||||
@@ -450,7 +450,7 @@ def approve_broadcast_message(service_id, broadcast_message_id):
|
|||||||
'views/broadcast/view-message.html',
|
'views/broadcast/view-message.html',
|
||||||
broadcast_message=broadcast_message,
|
broadcast_message=broadcast_message,
|
||||||
back_link=url_for(
|
back_link=url_for(
|
||||||
get_back_link_endpoint(),
|
_get_back_link_from_view_broadcast_endpoint(),
|
||||||
service_id=current_service.id,
|
service_id=current_service.id,
|
||||||
),
|
),
|
||||||
form=form,
|
form=form,
|
||||||
|
|||||||
Reference in New Issue
Block a user