Update views.py

This commit is contained in:
tcely 2025-05-26 07:06:15 -04:00 committed by GitHub
parent a198886ab5
commit 6f70fc763f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -349,6 +349,9 @@ class AddSourceView(EditSourceMixin, CreateView):
def get_initial(self):
initial = super().get_initial()
initial['target_schedule'] = timezone.now().replace(
second=0, microsecond=0,
).isoformat(timespec='minutes')
for k, v in self.prepopulated_data.items():
initial[k] = v
return initial