mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
OrderExtendForm: Allow to set today
This commit is contained in:
@@ -21,9 +21,9 @@ class ExtendForm(I18nModelForm):
|
|||||||
|
|
||||||
def clean(self):
|
def clean(self):
|
||||||
data = super().clean()
|
data = super().clean()
|
||||||
|
data['expires'] = data['expires'].replace(hour=23, minute=59, second=59)
|
||||||
if data['expires'] < now():
|
if data['expires'] < now():
|
||||||
raise ValidationError(_('The new expiry date needs to be in the future.'))
|
raise ValidationError(_('The new expiry date needs to be in the future.'))
|
||||||
data['expires'] = data['expires'].replace(hour=23, minute=59, second=59)
|
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user