From 3352ee2bbe175b0206eaf3b8e7dcea714749de05 Mon Sep 17 00:00:00 2001 From: luelista Date: Thu, 12 Mar 2026 18:09:16 +0100 Subject: [PATCH] Limits of the time machine feature (Z#23212144) (#5952) * Add note about limits of the time machine feature * Always check voucher validity against real time, not time machine time --- src/pretix/base/services/cart.py | 3 ++- .../presale/templates/pretixpresale/event/timemachine.html | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pretix/base/services/cart.py b/src/pretix/base/services/cart.py index 6080378f08..59abf6c878 100644 --- a/src/pretix/base/services/cart.py +++ b/src/pretix/base/services/cart.py @@ -334,7 +334,8 @@ def _check_position_constraints( raise CartPositionError(error_messages['voucher_invalid_subevent']) # Voucher expired - if voucher and voucher.valid_until and voucher.valid_until < time_machine_now_dt: + # (checked using real_now_dt as vouchers influence quota calculations) + if voucher and voucher.valid_until and voucher.valid_until < real_now_dt: raise CartPositionError(error_messages['voucher_expired']) # Subevent has been disabled diff --git a/src/pretix/presale/templates/pretixpresale/event/timemachine.html b/src/pretix/presale/templates/pretixpresale/event/timemachine.html index d06f28b5fc..275d1f5d62 100644 --- a/src/pretix/presale/templates/pretixpresale/event/timemachine.html +++ b/src/pretix/presale/templates/pretixpresale/event/timemachine.html @@ -20,6 +20,7 @@ {% bootstrap_form_errors timemachine_form "all" %}

{% trans "Test your shop as if it were a different date and time." %}

+

{% trans "Please note that the changed time is not taken into account for aspects of the shop that affect quotas, such as the validity period of carts and vouchers." %}

@@ -44,4 +45,4 @@
-{% endblock %} \ No newline at end of file +{% endblock %}