mirror of
https://github.com/GSA/notifications-api.git
synced 2026-05-05 08:40:29 -04:00
fix failed sanitise flow
the move from virus scan to validation failed function was called with the wrong variables, and had some internal logic that was slightly wrong. Also, Don't use `update_notification_by_id` for notifications if they are not in `created`, `sending`, `pending`, or `sent`. It silently doesn't update them. I didn't want to do a deeper investigation into the reasons behind this terrifying state machine as part of this commit so I just changed the functions to call `dao_update_notification` manually
This commit is contained in:
@@ -108,9 +108,9 @@ def move_error_pdf_to_scan_bucket(source_filename):
|
||||
|
||||
|
||||
def move_scan_to_invalid_pdf_bucket(source_filename):
|
||||
scan_bucket = current_app.config['LETTERS_SCAN_BUCKET_NAME']
|
||||
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)
|
||||
_move_s3_object(scan_bucket, source_filename, invalid_pdf_bucket, source_filename)
|
||||
|
||||
|
||||
def get_file_names_from_error_bucket():
|
||||
|
||||
Reference in New Issue
Block a user