From 5d6aea52cd0aa5c31f4a51cb7e38ac7363b66c17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20Caux?= <git@jscaux.org> Date: Mon, 14 Feb 2022 10:35:17 +0100 Subject: [PATCH] Tweak set deadline form. Fixes SCIPOST-1GR --- scipost_django/submissions/forms.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/scipost_django/submissions/forms.py b/scipost_django/submissions/forms.py index 2baa35be4..b3b1ee705 100644 --- a/scipost_django/submissions/forms.py +++ b/scipost_django/submissions/forms.py @@ -1972,7 +1972,6 @@ class ConsiderRefereeInvitationForm(forms.Form): class SetRefereeingDeadlineForm(forms.Form): deadline = forms.DateField( - required=False, label="", widget=forms.SelectDateWidget( years=[timezone.now().year + i for i in range(2)], @@ -1981,8 +1980,6 @@ class SetRefereeingDeadlineForm(forms.Form): ) def clean_deadline(self): - if not self.cleaned_data.get("deadline"): - self.add_error("deadline", "Please use a valid date.") if not (self.cleaned_data.get("deadline") >= timezone.now().date()): self.add_error("deadline", "Please choose a future date!") return self.cleaned_data.get("deadline") -- GitLab