Add notification history and notification to count

This commit is contained in:
Andrew Shumway
2023-10-23 10:24:00 -06:00
committed by Carlo Costino
parent db7aa969cd
commit 32dca0f5e0
2 changed files with 6 additions and 5 deletions

View File

@@ -191,9 +191,10 @@ def dao_get_notification_count_for_job_id(*, job_id):
def dao_get_notification_count_for_service(*, service_id):
count = Notification.query.filter_by(service_id=service_id).count()
print(count)
return count
notification_count = Notification.query.filter_by(service_id=service_id).count()
notification_history_count = NotificationHistory.query.filter_by(service_id=service_id).count()
total_count = notification_count + notification_history_count
return total_count
def get_notification_with_personalisation(service_id, notification_id, key_type):