mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-30 22:29:32 +00:00
Small news improvement and bug fixes
This commit is contained in:
1 parent
44dacce9f2
commit
6a815e5a21
4 files changed
+7
-12
No files matched your search
@@ -107,6 +107,8 @@ class NewsForm(forms.ModelForm):
|
||||
self.add_error('start_date', ValidationError(_("This field is required.")))
|
||||
if not self.cleaned_data['end_date']:
|
||||
self.add_error('end_date', ValidationError(_("This field is required.")))
|
||||
if self.cleaned_data['start_date'] > self.cleaned_data['end_date']:
|
||||
self.add_error('end_date', ValidationError(_("You crazy? You can not finish an event before starting it.")))
|
||||
if self.cleaned_data['type'] == "WEEKLY" and not self.cleaned_data['until']:
|
||||
self.add_error('until', ValidationError(_("This field is required.")))
|
||||
return self.cleaned_data
|
||||
|
||||
Reference in new issue
Block a user