This commit is contained in:
Kenneth Kehl
2025-06-10 10:33:59 -07:00
parent 419e70bfd7
commit 34434bda57
9 changed files with 15 additions and 38 deletions

View File

@@ -2,6 +2,9 @@ import os
import uuid
from flask import current_app, g, request
from sqlalchemy.orm.exc import NoResultFound
from app.serialised_models import SerialisedService
from notifications_python_client.authentication import (
decode_jwt_token,
get_token_issuer,
@@ -13,9 +16,6 @@ from notifications_python_client.errors import (
TokenExpiredError,
TokenIssuerError,
)
from sqlalchemy.orm.exc import NoResultFound
from app.serialised_models import SerialisedService
from notifications_utils import request_helper
# stvnrlly - this is silly, but bandit has a multiline string bug (https://github.com/PyCQA/bandit/issues/658)

View File

@@ -11,7 +11,6 @@ import flask
from click_datetime import Datetime as click_dt
from faker import Faker
from flask import current_app, json
from notifications_python_client.authentication import create_jwt_token
from sqlalchemy import and_, select, text, update
from sqlalchemy.exc import IntegrityError
from sqlalchemy.orm.exc import NoResultFound
@@ -58,6 +57,7 @@ from app.models import (
User,
)
from app.utils import utc_now
from notifications_python_client.authentication import create_jwt_token
from notifications_utils.recipients import RecipientCSV
from notifications_utils.template import SMSMessageTemplate
from tests.app.db import (

View File

@@ -64,7 +64,9 @@ def get_notification_by_id(notification_id):
schema = PublicNotificationResponseSchema()
schema.context = {
"notification_instance": notification,
"template_subject": getattr(template, "subject", None) if hasattr(template, "subject") else None
"template_subject": (
getattr(template, "subject", None) if hasattr(template, "subject") else None
),
}
serialized = schema.dump(notification)