mirror of
https://github.com/pretix/pretix.git
synced 2026-05-09 15:54:03 +00:00
Always allow to shred empty event series
PRETIXEU-24B
This commit is contained in:
@@ -34,7 +34,7 @@ def shred_constraints(event: Event):
|
|||||||
max_fromto=Greatest(Max('date_to'), Max('date_from'))
|
max_fromto=Greatest(Max('date_to'), Max('date_from'))
|
||||||
)
|
)
|
||||||
max_date = max_date['max_fromto'] or max_date['max_to'] or max_date['max_from']
|
max_date = max_date['max_fromto'] or max_date['max_to'] or max_date['max_from']
|
||||||
if max_date > now() - timedelta(days=60):
|
if max_date is not None and max_date > now() - timedelta(days=60):
|
||||||
return _('Your event needs to be over for at least 60 days to use this feature.')
|
return _('Your event needs to be over for at least 60 days to use this feature.')
|
||||||
else:
|
else:
|
||||||
if (event.date_to or event.date_from) > now() - timedelta(days=60):
|
if (event.date_to or event.date_from) > now() - timedelta(days=60):
|
||||||
|
|||||||
Reference in New Issue
Block a user