Commit 76b0ed0a authored by Flavio TARSETTI's avatar Flavio TARSETTI
Browse files

[ui] patched registration forms in case of invalid godfather (blocked status)

parent b5eaa6b6
......@@ -107,6 +107,8 @@ class RegistrationForm(forms.Form):
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.'))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment