Fixed scan errors

This commit is contained in:
alexjanousekGSA
2025-06-02 10:44:42 -04:00
parent 07195ba145
commit c8eae375f4
2 changed files with 17 additions and 4 deletions

View File

@@ -63,8 +63,14 @@ def get_notification_by_id(notification_id):
if hasattr(template, "subject"):
try:
notification.__dict__["subject"] = template.subject
except Exception:
pass # in case subject is a read-only property
except AttributeError as e:
current_app.logger.warning(
f"Could not set subject on notification: {e}"
)
except Exception as e:
current_app.logger.error(
f"Unexpected error setting notification subject: {e}"
)
schema = PublicNotificationResponseSchema()
schema.context = {"notification_instance": notification}