mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-17 04:58:50 -04:00
Use sanitised pdfs for sending and handle invalid pdfs, details below:
- pass new, sanitised pdf for sending - move invalid pdfs to a newly created bucket - set status fro notifications that failed pdf validation to a new status validation-failed - adjust existing tests
This commit is contained in:
committed by
Leo Hemsted
parent
cd563283d5
commit
e22e7245fe
@@ -107,6 +107,12 @@ def move_error_pdf_to_scan_bucket(source_filename):
|
||||
_move_s3_object(scan_bucket, error_file, scan_bucket, source_filename)
|
||||
|
||||
|
||||
def move_scan_to_invalid_pdf_bucket(source_filename):
|
||||
invalid_pdf_bucket = current_app.config['INVALID_PDF_BUCKET_NAME']
|
||||
invalid_pdf = source_filename
|
||||
_move_s3_object(invalid_pdf_bucket, invalid_pdf, invalid_pdf_bucket, source_filename)
|
||||
|
||||
|
||||
def get_file_names_from_error_bucket():
|
||||
s3 = boto3.resource('s3')
|
||||
scan_bucket = current_app.config['LETTERS_SCAN_BUCKET_NAME']
|
||||
|
||||
Reference in New Issue
Block a user