Skip to content

Commit

Permalink
Merge branch 'main' into k8s-rollout-workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ben851 authored Mar 7, 2024
2 parents 53fc6de + 9117ec7 commit eff70f1
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 eff70f1

Please sign in to comment.