From ba09474d0a100e7cf958504c687d132f8c7c2ea3 Mon Sep 17 00:00:00 2001 From: Mark Steward Date: Sat, 25 May 2024 11:06:02 +0100 Subject: [PATCH] Guard for email_tickets --- apps/tickets/tasks.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/tickets/tasks.py b/apps/tickets/tasks.py index af0942952..f53a55496 100644 --- a/apps/tickets/tasks.py +++ b/apps/tickets/tasks.py @@ -410,6 +410,10 @@ def email_tickets(): ctx = app.test_request_context() ctx.push() + if not feature_enabled('ISSUE_TICKETS'): + app.logger.warn("Not emailing tickets as ISSUE_TICKETS is disabled") + return + users_purchase_counts = ( Purchase.query.filter_by(is_paid_for=True, state="paid") .join(PriceTier, Product, ProductGroup)