mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-20 14:29:25 -04:00
merge from main
This commit is contained in:
@@ -60,7 +60,7 @@ def get_current_calendar_year_start_year():
|
||||
|
||||
|
||||
def get_calendar_year_for_datetime(start_date):
|
||||
if type(start_date) == date:
|
||||
if isinstance(start_date, date):
|
||||
start_date = datetime.combine(start_date, time.min)
|
||||
|
||||
year = int(start_date.strftime("%Y"))
|
||||
|
||||
@@ -197,6 +197,11 @@ def dao_get_notification_count_for_job_id(*, job_id):
|
||||
return Notification.query.filter_by(job_id=job_id).count()
|
||||
|
||||
|
||||
def dao_get_notification_count_for_service(*, service_id):
|
||||
notification_count = Notification.query.filter_by(service_id=service_id).count()
|
||||
return notification_count
|
||||
|
||||
|
||||
def get_notification_with_personalisation(service_id, notification_id, key_type):
|
||||
filter_dict = {"service_id": service_id, "id": notification_id}
|
||||
if key_type:
|
||||
|
||||
Reference in New Issue
Block a user