Fix for a date widget when creating a new TestRun
PRODX-36711
Change-Id: If711fbccb4ad657cf6495135c69dfbb14a6f2b85
diff --git a/testrail_bot/control/views.py b/testrail_bot/control/views.py
index 24f4987..ba5434b 100644
--- a/testrail_bot/control/views.py
+++ b/testrail_bot/control/views.py
@@ -29,7 +29,6 @@
else:
form = forms.TestRunForm(instance=run)
- form.fields["timestamp"].initial = datetime.date.today()
return render(request, "control/update_run.html",
{"form": form, "run_id": run_id})
@@ -43,6 +42,7 @@
else:
form = forms.TestRunForm()
+ form.fields["timestamp"].initial = datetime.date.today()
return render(request, "control/create_run.html", {"form": form})