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)