Skip to content

Commit

Permalink
Guard for email_tickets
Browse files Browse the repository at this point in the history
  • Loading branch information
marksteward committed May 25, 2024
1 parent fc9d1f1 commit ba09474
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/tickets/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ba09474

Please sign in to comment.