commit
f4ccca4d65
|
@ -506,7 +506,7 @@ def getManageCampaignForm ( instance, data=None, initial=None, *args, **kwargs )
|
||||||
new_deadline= new_deadline_date + timedelta(hours=23,minutes=59)
|
new_deadline= new_deadline_date + timedelta(hours=23,minutes=59)
|
||||||
if self.instance:
|
if self.instance:
|
||||||
if self.instance.status == 'ACTIVE':
|
if self.instance.status == 'ACTIVE':
|
||||||
return self.instance.deadline.date()
|
return self.instance.deadline
|
||||||
if new_deadline_date - now() > timedelta(days=int(settings.UNGLUEIT_LONGEST_DEADLINE)):
|
if new_deadline_date - now() > timedelta(days=int(settings.UNGLUEIT_LONGEST_DEADLINE)):
|
||||||
raise forms.ValidationError(_('The chosen closing date is more than %s days from now' % settings.UNGLUEIT_LONGEST_DEADLINE))
|
raise forms.ValidationError(_('The chosen closing date is more than %s days from now' % settings.UNGLUEIT_LONGEST_DEADLINE))
|
||||||
elif new_deadline - now() < timedelta(days=0):
|
elif new_deadline - now() < timedelta(days=0):
|
||||||
|
|
Loading…
Reference in New Issue