mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 15:57:23 -04:00
Clarify purpose of file_id in redirects
In response to: [1]. [1]: https://github.com/alphagov/notifications-admin/pull/4159/files#r813050941
This commit is contained in:
@@ -270,8 +270,10 @@ def uploaded_letter_preview(service_id, file_id):
|
|||||||
except LetterNotFoundError as e:
|
except LetterNotFoundError as e:
|
||||||
current_app.logger.warning(e)
|
current_app.logger.warning(e)
|
||||||
|
|
||||||
# if the file's not there, it's probably because we've already created the notification and the letter has been
|
# If the file is missing it could be because this is a duplicate
|
||||||
# moved to the normal letters-pdf bucket. So lets just bounce out to the notification page
|
# request, the notification already exists and the file has been
|
||||||
|
# moved to a different bucket. Note that the ID of a precompiled
|
||||||
|
# notification is always set to the file_id.
|
||||||
return redirect(url_for(
|
return redirect(url_for(
|
||||||
'.view_notification',
|
'.view_notification',
|
||||||
service_id=service_id,
|
service_id=service_id,
|
||||||
@@ -356,8 +358,10 @@ def send_uploaded_letter(service_id, file_id):
|
|||||||
except LetterNotFoundError as e:
|
except LetterNotFoundError as e:
|
||||||
current_app.logger.error(e)
|
current_app.logger.error(e)
|
||||||
|
|
||||||
# if the file's not there, it's probably because we've already created the notification and the letter has been
|
# If the file is missing it could be because this is a duplicate
|
||||||
# moved to the normal letters-pdf bucket. So lets just bounce out to the notification page
|
# request, the notification already exists and the file has been
|
||||||
|
# moved to a different bucket. Note that the ID of a precompiled
|
||||||
|
# notification is always set to the file_id.
|
||||||
return redirect(url_for(
|
return redirect(url_for(
|
||||||
'.view_notification',
|
'.view_notification',
|
||||||
service_id=service_id,
|
service_id=service_id,
|
||||||
|
|||||||
Reference in New Issue
Block a user