mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-31 15:15:38 -05:00
Added the random string reference to the letter
- uses the reference field on the notifications table to store a 16char random string used to cross reference DVLA letters back to the notification - used as letter barcode does not have space for a UUID notification id Depends on https://github.com/alphagov/notifications-utils/pull/149 Renamed the numeric_id to notification_reference in utils and changed validation rules to match this Note also the persist_notification method set "reference" to be "client_reference" which is confusing and they are different things, so fixed this too.
This commit is contained in:
@@ -36,6 +36,7 @@ def persist_notification(template_id,
|
||||
job_id=None,
|
||||
job_row_number=None,
|
||||
reference=None,
|
||||
client_reference=None,
|
||||
notification_id=None,
|
||||
simulated=False):
|
||||
# if simulated create a Notification model to return but do not persist the Notification to the dB
|
||||
@@ -53,7 +54,8 @@ def persist_notification(template_id,
|
||||
created_at=created_at or datetime.utcnow(),
|
||||
job_id=job_id,
|
||||
job_row_number=job_row_number,
|
||||
client_reference=reference
|
||||
client_reference=client_reference,
|
||||
reference=reference
|
||||
)
|
||||
if not simulated:
|
||||
dao_create_notification(notification)
|
||||
|
||||
Reference in New Issue
Block a user