mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 09:26:08 -05:00
Add endpoint to return the summary data for returned letters.
Returning the count of letters that are returned for each report date.
This commit is contained in:
@@ -950,11 +950,11 @@ def create_returned_letter(service, reported_at=None):
|
||||
template = create_template(service=service, template_type=LETTER_TYPE)
|
||||
notification = create_notification(template=template, status=NOTIFICATION_RETURNED_LETTER)
|
||||
returned_letter = ReturnedLetter(
|
||||
service_id= service.id,
|
||||
reported_at= reported_at or datetime.utcnow(),
|
||||
notification_id= notification.id
|
||||
service_id=service.id,
|
||||
reported_at=reported_at or datetime.utcnow(),
|
||||
notification_id=notification.id
|
||||
)
|
||||
|
||||
db.session.add(returned_letter)
|
||||
db.session.commit()
|
||||
return returned_letter
|
||||
return returned_letter
|
||||
|
||||
Reference in New Issue
Block a user