Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
beat
beat.web
Commits
76b0ed0a
Commit
76b0ed0a
authored
Jul 17, 2017
by
Flavio TARSETTI
Browse files
[ui] patched registration forms in case of invalid godfather (blocked status)
parent
b5eaa6b6
Changes
1
Show whitespace changes
Inline
Side-by-side
beat/web/ui/registration/forms.py
View file @
76b0ed0a
...
...
@@ -107,6 +107,8 @@ class RegistrationForm(forms.Form):
"""
try
:
user
=
User
.
objects
.
get
(
username__iexact
=
self
.
cleaned_data
[
'godfather'
])
if
user
.
profile
.
status
==
Profile
.
BLOCKED
:
raise
forms
.
ValidationError
(
_
(
u
'This user is not a valid godfather. Please choose another.'
))
except
User
.
DoesNotExist
:
raise
forms
.
ValidationError
(
_
(
u
'This godfather username does not exist. Please choose another.'
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment