mirror of
https://github.com/GSA/notifications-api.git
synced 2026-07-28 11:49:42 -04:00
add flag to return pdf content via api
this is only applicable when getting a single notification by id. it's also ignored if the notification isn't a letter. Otherwise, it overwrites the 'body' field in the response. If the notification's pdf is available, it returns that, base64 encoded. If the pdf is not available, it returns an empty string. The pdf won't be available if the notification's status is: * pending-virus-scan * virus-scan-failed * validation-failed * technical-failure The pdf will be retrieved from the correct s3 bucket based on its type
This commit is contained in:
@@ -1547,7 +1547,7 @@ class Notification(db.Model):
|
||||
elif self.status in [NOTIFICATION_DELIVERED, NOTIFICATION_RETURNED_LETTER]:
|
||||
return NOTIFICATION_STATUS_LETTER_RECEIVED
|
||||
else:
|
||||
# Currently can only be technical-failure
|
||||
# Currently can only be technical-failure OR pending-virus-check OR validation-failed
|
||||
return self.status
|
||||
|
||||
def get_created_by_name(self):
|
||||
|
||||
Reference in New Issue
Block a user