Commit e4fe56f664901be40a15e369134258114f9b9a64
Committed by
Sergio Oliveira
1 parent
e80461ab
Exists in
master
and in
39 other branches
Corrected empty checking for user and username
Signed-off-by: Carlos Oliveira <carlospecter@gmail.com> Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
colab/accounts/auth.py
colab/accounts/forms.py
... | ... | @@ -58,7 +58,7 @@ class UserCreationForm(UserForm): |
58 | 58 | def clean_username(self): |
59 | 59 | username = self.cleaned_data['username'] |
60 | 60 | username = username.strip() |
61 | - if len(username) is 0: | |
61 | + if not username: | |
62 | 62 | raise forms.ValidationError('This field should not be blank.') |
63 | 63 | return username |
64 | 64 | ... | ... |