mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 07:21:13 -05:00
fix personalization on job/service/notification api
This commit is contained in:
@@ -90,6 +90,14 @@ def get_all_notifications_for_service_job(service_id, job_id):
|
||||
notification.to = recipient
|
||||
notification.normalised_to = recipient
|
||||
|
||||
for notification in paginated_notifications.items:
|
||||
if notification.job_id is not None:
|
||||
notification.personalisation = get_personalisation_from_s3(
|
||||
notification.service_id,
|
||||
notification.job_id,
|
||||
notification.job_row_number,
|
||||
)
|
||||
|
||||
notifications = None
|
||||
if data.get("format_for_csv"):
|
||||
notifications = [
|
||||
@@ -101,14 +109,6 @@ def get_all_notifications_for_service_job(service_id, job_id):
|
||||
paginated_notifications.items, many=True
|
||||
)
|
||||
|
||||
for notification in paginated_notifications.items:
|
||||
if notification.job_id is not None:
|
||||
notification.personalisation = get_personalisation_from_s3(
|
||||
notification.service_id,
|
||||
notification.job_id,
|
||||
notification.job_row_number,
|
||||
)
|
||||
|
||||
return (
|
||||
jsonify(
|
||||
notifications=notifications,
|
||||
|
||||
Reference in New Issue
Block a user