From 7f1aeb686ab97355c92234edeff936386687dfdd Mon Sep 17 00:00:00 2001 From: Andrew Leith Date: Thu, 28 Nov 2024 18:31:04 +0000 Subject: [PATCH] fix: only check for `send_exceeds_annual_limit` when FF is on --- app/main/views/send.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/main/views/send.py b/app/main/views/send.py index ab6412caf1..e96c3f4f1d 100644 --- a/app/main/views/send.py +++ b/app/main/views/send.py @@ -825,9 +825,13 @@ def check_messages(service_id, template_id, upload_id, row_index=2): if data["errors"] or data["trying_to_send_letters_in_trial_mode"]: return render_template("views/check/column-errors.html", **data) - if data["send_exceeds_daily_limit"] or data["send_exceeds_annual_limit"]: + if data["send_exceeds_daily_limit"]: return render_template("views/check/column-errors.html", **data) + if current_app.config["FF_ANNUAL_LIMIT"]: + if data["send_exceeds_annual_limit"]: + return render_template("views/check/column-errors.html", **data) + metadata_kwargs = { "notification_count": data["count_of_recipients"], "template_id": str(template_id),