mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 18:01:08 -05:00
Merge pull request #2617 from alphagov/notification-count-for-job
Return count of notifications in the database for a job
This commit is contained in:
@@ -178,6 +178,11 @@ def get_notifications_for_job(service_id, job_id, filter_dict=None, page=1, page
|
||||
)
|
||||
|
||||
|
||||
@statsd(namespace="dao")
|
||||
def dao_get_notification_count_for_job_id(*, job_id):
|
||||
return Notification.query.filter_by(job_id=job_id).count()
|
||||
|
||||
|
||||
@statsd(namespace="dao")
|
||||
def get_notification_with_personalisation(service_id, notification_id, key_type):
|
||||
filter_dict = {'service_id': service_id, 'id': notification_id}
|
||||
|
||||
Reference in New Issue
Block a user