mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-16 20:48:37 -04:00
Refactor the code that figures out what folder and filename to use for the letter pdf files.
Now we consistently use the created_at date, so we can always get the right file location and name. The previous updates to this code were trying to solve the problem if a pdf being created at 17:29, but not ready to upload until 17:31 after the antivirus and validation check. But in those cases we would have trouble finding the file.
This commit is contained in:
@@ -178,8 +178,9 @@ def send_pdf_letter_notification(service_id, post_data):
|
||||
)
|
||||
|
||||
upload_filename = get_letter_pdf_filename(
|
||||
notification.reference,
|
||||
notification.service.crown,
|
||||
reference=notification.reference,
|
||||
crown=notification.service.crown,
|
||||
sending_date=notification.created_at,
|
||||
is_scan_letter=False,
|
||||
postage=notification.postage
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user