Skip to content

Commit 39985eb

Browse files
kkthxbye-codejeremystretch
authored andcommitted
Fix exception when scheduling a job in the past
1 parent 92ec06c commit 39985eb

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

netbox/extras/forms/scripts.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,7 @@ def __init__(self, *args, **kwargs):
4848
def clean__schedule_at(self):
4949
scheduled_time = self.cleaned_data['_schedule_at']
5050
if scheduled_time and scheduled_time < timezone.now():
51-
raise forms.ValidationError({
52-
'_schedule_at': _('Scheduled time must be in the future.')
53-
})
51+
raise forms.ValidationError(_('Scheduled time must be in the future.'))
5452

5553
return scheduled_time
5654

0 commit comments

Comments
 (0)