From b90948a9937988f7dccf13b6187f5770b08cc37e Mon Sep 17 00:00:00 2001 From: Mark Steward Date: Sat, 25 May 2024 12:07:32 +0100 Subject: [PATCH] Another missing guard --- apps/common/receipt.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/common/receipt.py b/apps/common/receipt.py index 8f91a017c..f8540bcab 100644 --- a/apps/common/receipt.py +++ b/apps/common/receipt.py @@ -6,6 +6,7 @@ from playwright.async_api import async_playwright import segno +from apps.common import feature_enabled from main import external_url from models import event_year from models.product import Product, ProductGroup, PriceTier @@ -125,6 +126,9 @@ def attach_tickets(msg, user): def set_tickets_emailed(user): + if not feature_enabled("ISSUE_TICKETS"): + return False + purchases = ( user.owned_purchases.filter_by(is_paid_for=True) .filter(Purchase.state.in_(["paid"]))