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
This commit is contained in:
luelista
2026-03-12 18:09:16 +01:00
committed by GitHub
parent af28785fb9
commit 3352ee2bbe
2 changed files with 4 additions and 2 deletions

View File

@@ -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

View File

@@ -20,6 +20,7 @@
{% bootstrap_form_errors timemachine_form "all" %}
<p>{% trans "Test your shop as if it were a different date and time." %}</p>
<p>{% 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." %}</p>
<div class="row">
<div class="col-md-6">
@@ -44,4 +45,4 @@
<div class="clear"></div>
</div>
</div>
{% endblock %}
{% endblock %}