updated _schedule_at to use local time when _interval is set

This commit is contained in:
Abhimanyu Saharan 2023-03-19 20:35:32 +05:30
parent 8d25d7812c
commit 258fc00c6a

View File

@ -52,7 +52,7 @@ class ScriptForm(BootstrapMixin, forms.Form):
# When interval is used without schedule at, raise an exception # When interval is used without schedule at, raise an exception
if self.cleaned_data['_interval'] and not scheduled_time: if self.cleaned_data['_interval'] and not scheduled_time:
raise forms.ValidationError(_('Scheduled time must be set when recurs is used.')) self.cleaned_data['_schedule_at'] = local_now()
return self.cleaned_data return self.cleaned_data