mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Fix exception when scheduling a job in the past
This commit is contained in:
committed by
Jeremy Stretch
parent
92ec06c694
commit
39985ebdd1
@ -48,9 +48,7 @@ class ScriptForm(BootstrapMixin, forms.Form):
|
||||
def clean__schedule_at(self):
|
||||
scheduled_time = self.cleaned_data['_schedule_at']
|
||||
if scheduled_time and scheduled_time < timezone.now():
|
||||
raise forms.ValidationError({
|
||||
'_schedule_at': _('Scheduled time must be in the future.')
|
||||
})
|
||||
raise forms.ValidationError(_('Scheduled time must be in the future.'))
|
||||
|
||||
return scheduled_time
|
||||
|
||||
|
Reference in New Issue
Block a user