mirror of
https://github.com/pretix/pretix.git
synced 2026-05-17 17:14:04 +00:00
fix error if max_extend=None
This commit is contained in:
@@ -229,7 +229,7 @@ class CartMixin:
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
first_expiry = min(p.expires for p in positions) if positions else now()
|
first_expiry = min(p.expires for p in positions) if positions else now()
|
||||||
max_expiry_extend = min(p.max_extend for p in positions) if positions else now()
|
max_expiry_extend = min((p.max_extend for p in positions if p.max_extend), default=None)
|
||||||
total_seconds_left = max(first_expiry - now(), timedelta()).total_seconds()
|
total_seconds_left = max(first_expiry - now(), timedelta()).total_seconds()
|
||||||
minutes_left = int(total_seconds_left // 60)
|
minutes_left = int(total_seconds_left // 60)
|
||||||
seconds_left = int(total_seconds_left % 60)
|
seconds_left = int(total_seconds_left % 60)
|
||||||
|
|||||||
Reference in New Issue
Block a user