Skip to content

Commit

Permalink
Merge branch 'k8s-rollout-workflow' of github.com:cds-snc/notificatio…
Browse files Browse the repository at this point in the history
…n-api into k8s-rollout-workflow
  • Loading branch information
ben851 committed Mar 7, 2024
2 parents 064bd61 + eff70f1 commit ef63de3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/job/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,14 @@ def create_job(service_id):
increment_sms_daily_count_send_warnings_if_needed(service, len(recipient_csv))

elif template.template_type == EMAIL_TYPE:
notification_count = int(data.get("notification_count", len(recipient_csv)))
if "notification_count" in data:
notification_count = int(data["notification_count"])
else:
current_app.logger.warning(
f"notification_count not in metadata for job {data['id']}, using len(recipient_csv) instead."
)
notification_count = len(recipient_csv)

check_email_daily_limit(service, notification_count)

scheduled_for = datetime.fromisoformat(data.get("scheduled_for")) if data.get("scheduled_for") else None
Expand Down

0 comments on commit ef63de3

Please sign in to comment.