mirror of
https://github.com/GSA/notifications-api.git
synced 2026-07-30 03:08:32 -04:00
initial
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user