Commit 517620580b9ac94e10049a79b467d3895b16e88d

Authored by Gustavo
1 parent 134ae8bd

News form updated

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
news/forms.py
... ... @@ -18,8 +18,8 @@ class NewsForm(forms.ModelForm):
18 18  
19 19 def clean_title(self):
20 20 title = self.cleaned_data.get('title', '')
21   - if same_name > 0:
22   - self._errors['name'] = [_('This subject already has a pdf file with this name')]
  21 + if title == '':
  22 + self._errors['name'] = [_('This field is required')]
23 23  
24 24 return ValueError
25 25  
... ...