mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 09:26:08 -05:00
Process Incomplete Jobs Updates
Comments are PR review. Updated code style in a few places to make it more consistent with other code, added tests for letters and emails so they are testedt, refactored some database queries to dao file - Fixed code style - Refactored database queries to dao code - Added tests for emails and sms.
This commit is contained in:
@@ -640,3 +640,14 @@ def dao_get_notification_email_reply_for_notification(notification_id):
|
||||
|
||||
if email_reply_to:
|
||||
return email_reply_to.email_address
|
||||
|
||||
|
||||
@statsd(namespace="dao")
|
||||
def dao_get_last_notification_added_for_job_id(job_id):
|
||||
last_notification_added = Notification.query.filter(
|
||||
Notification.job_id == job_id
|
||||
).order_by(
|
||||
Notification.job_row_number.desc()
|
||||
).first()
|
||||
|
||||
return last_notification_added
|
||||
|
||||
Reference in New Issue
Block a user