Browse Source

Change "[email protected] is not available" message to "[email protected] is already registed".

pull/193/head
Pēteris Caune 6 years ago
parent
commit
621e04e845
No known key found for this signature in database GPG Key ID: E28D7679E9A9EDE2
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      hc/accounts/forms.py
  2. +1
    -1
      hc/accounts/tests/test_change_email.py

+ 1
- 1
hc/accounts/forms.py View File

@ -39,7 +39,7 @@ class ChangeEmailForm(forms.Form):
def clean_email(self):
v = self.cleaned_data["email"]
if User.objects.filter(email=v).exists():
raise forms.ValidationError("%s is not available" % v)
raise forms.ValidationError("%s is already registered" % v)
return v


+ 1
- 1
hc/accounts/tests/test_change_email.py View File

@ -35,7 +35,7 @@ class ChangeEmailTestCase(BaseTestCase):
payload = {"email": "[email protected]"}
r = self.client.post("/accounts/change_email/foo/", payload)
self.assertContains(r, "[email protected] is not available")
self.assertContains(r, "[email protected] is already registered")
self.alice.refresh_from_db()
self.assertEqual(self.alice.email, "[email protected]")

Loading…
Cancel
Save