mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-14 17:22:17 -05:00
Use personalisation to set client_reference for letters
which were sent through Notify interface only. This is done to avoid performance dip from additional operation for other notification types.
This commit is contained in:
@@ -58,7 +58,7 @@ from app.models import (
|
||||
from app.notifications.process_notifications import persist_notification
|
||||
from app.serialised_models import SerialisedService, SerialisedTemplate
|
||||
from app.service.utils import service_allowed_to_send_to
|
||||
from app.utils import DATETIME_FORMAT
|
||||
from app.utils import DATETIME_FORMAT, get_reference_from_personalisation
|
||||
|
||||
|
||||
@notify_celery.task(name="process-job")
|
||||
@@ -383,6 +383,7 @@ def save_letter(
|
||||
job_row_number=notification['row_number'],
|
||||
notification_id=notification_id,
|
||||
reference=create_random_identifier(),
|
||||
client_reference=get_reference_from_personalisation(notification['personalisation']),
|
||||
reply_to_text=template.reply_to_text,
|
||||
status=status
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user