forked from CGM_Public/pretix_original
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:
@@ -334,7 +334,8 @@ def _check_position_constraints(
|
|||||||
raise CartPositionError(error_messages['voucher_invalid_subevent'])
|
raise CartPositionError(error_messages['voucher_invalid_subevent'])
|
||||||
|
|
||||||
# Voucher expired
|
# 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'])
|
raise CartPositionError(error_messages['voucher_expired'])
|
||||||
|
|
||||||
# Subevent has been disabled
|
# Subevent has been disabled
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
{% bootstrap_form_errors timemachine_form "all" %}
|
{% bootstrap_form_errors timemachine_form "all" %}
|
||||||
|
|
||||||
<p>{% trans "Test your shop as if it were a different date and time." %}</p>
|
<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="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
@@ -44,4 +45,4 @@
|
|||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
Reference in New Issue
Block a user