Commit 60c9498a authored by tleb's avatar tleb

Fix 500 on news creation/edition

parent 42f5773f
Pipeline #2101 passed with stage
in 40 minutes and 53 seconds
......@@ -230,7 +230,11 @@ class NewsForm(forms.ModelForm):
"end_date", ValidationError(_("This field is required."))
if self.cleaned_data["start_date"] > self.cleaned_data["end_date"]:
if (
not self.has_error("start_date")
and not self.has_error("end_date")
and self.cleaned_data["start_date"] > self.cleaned_data["end_date"]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment