mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 07:35:34 -05:00
Merge branch 'master' of https://github.com/alphagov/notifications-api into add-mmg-inbound-sms-auth
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from datetime import datetime, timedelta
|
||||
from datetime import datetime, timedelta, time
|
||||
|
||||
from flask import current_app
|
||||
|
||||
@@ -83,8 +83,13 @@ def remove_transformed_dvla_file(job_id):
|
||||
|
||||
def upload_letters_pdf(reference, crown, filedata):
|
||||
now = datetime.utcnow()
|
||||
|
||||
print_datetime = now
|
||||
if now.time() > time(17, 30):
|
||||
print_datetime = now + timedelta(days=1)
|
||||
|
||||
upload_file_name = LETTERS_PDF_FILE_LOCATION_STRUCTURE.format(
|
||||
folder=now.date().isoformat(),
|
||||
folder=print_datetime.date(),
|
||||
reference=reference,
|
||||
duplex="D",
|
||||
letter_class="2",
|
||||
|
||||
Reference in New Issue
Block a user