mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 23:41:17 -05:00
Return recipient for letter uploads
If your caseworking system always spits out files with the same name it will be hard to differentiate them when looking at the uploads page. Seeing who the letter was sent to will help you differentiate them. We can’t do this until the API returns the recipient.
This commit is contained in:
@@ -30,7 +30,8 @@ def dao_get_uploads_by_service_id(service_id, limit_days=None, page=1, page_size
|
||||
Job.scheduled_for.label("scheduled_for"),
|
||||
Job.processing_started.label('processing_started'),
|
||||
Job.job_status.label("status"),
|
||||
literal('job').label('upload_type')
|
||||
literal('job').label('upload_type'),
|
||||
literal(None).label('recipient'),
|
||||
).join(
|
||||
Template, Job.template_id == Template.id
|
||||
).filter(
|
||||
@@ -58,7 +59,8 @@ def dao_get_uploads_by_service_id(service_id, limit_days=None, page=1, page_size
|
||||
# letters don't have a processing_started date but we want created_at to be used for sorting
|
||||
Notification.created_at.label('processing_started'),
|
||||
Notification.status,
|
||||
literal('letter').label('upload_type')
|
||||
literal('letter').label('upload_type'),
|
||||
Notification.to.label('recipient'),
|
||||
).join(
|
||||
Template, Notification.template_id == Template.id
|
||||
).filter(
|
||||
|
||||
Reference in New Issue
Block a user