mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-05 16:38:59 -04:00
Add form.validate_on_submit for sending uploaded letter
Decided it was better to call this then not. This does rely on the file_id not being corrupted so the file_id passed into `uploaded_letter_preview` is valid but am taking that risk given it should only change if a user is changing the form html.
This commit is contained in:
@@ -202,8 +202,11 @@ def send_uploaded_letter(service_id):
|
||||
abort(403)
|
||||
|
||||
form = LetterUploadPostageForm()
|
||||
|
||||
file_id = form.file_id.data
|
||||
|
||||
if not form.validate_on_submit():
|
||||
return uploaded_letter_preview(service_id, file_id)
|
||||
|
||||
postage = form.postage.data
|
||||
metadata = get_letter_metadata(service_id, file_id)
|
||||
filename = metadata.get('filename')
|
||||
|
||||
Reference in New Issue
Block a user