merge from main

This commit is contained in:
Kenneth Kehl
2023-11-03 07:10:06 -07:00
17 changed files with 627 additions and 422 deletions

View File

@@ -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"))

View File

@@ -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: