mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 03:23:12 -04:00
fix tests
This commit is contained in:
@@ -3,6 +3,7 @@ from datetime import datetime
|
||||
|
||||
from flask import (
|
||||
Response,
|
||||
flash,
|
||||
jsonify,
|
||||
render_template,
|
||||
request,
|
||||
@@ -32,14 +33,16 @@ from app.utils.user import user_has_permissions
|
||||
|
||||
@main.route("/services/<uuid:service_id>/notification/<uuid:notification_id>")
|
||||
@user_has_permissions("view_activity", "send_messages")
|
||||
def view_notification(service_id, notification_id):
|
||||
def view_notification(service_id, notification_id, error_message=None):
|
||||
if error_message:
|
||||
flash(error_message)
|
||||
|
||||
notification = notification_api_client.get_notification(
|
||||
service_id, str(notification_id)
|
||||
)
|
||||
notification["template"].update({"reply_to_text": notification["reply_to_text"]})
|
||||
|
||||
personalisation = get_all_personalisation_from_notification(notification)
|
||||
error_message = None
|
||||
|
||||
template = get_template(
|
||||
notification["template"],
|
||||
|
||||
Reference in New Issue
Block a user