Fix Duplikátní e-mail v editaci
This commit is contained in:
parent
3f62d9cef1
commit
835f987797
1 changed files with 12 additions and 12 deletions
|
@ -193,18 +193,18 @@ class ProfileEditForm(forms.Form):
|
||||||
# pass
|
# pass
|
||||||
# return username
|
# return username
|
||||||
#
|
#
|
||||||
# def clean_email(self):
|
def clean_email(self):
|
||||||
# err_logger = logging.getLogger('seminar.prihlaska.problem')
|
err_logger = logging.getLogger('seminar.prihlaska.problem')
|
||||||
# email = self.cleaned_data.get('email')
|
email = self.cleaned_data.get('email')
|
||||||
# try:
|
try:
|
||||||
# Osoba.objects.get(email=email)
|
Osoba.objects.get(email=email)
|
||||||
# msg = "Email {} exists".format(email)
|
msg = "Email {} exists (in edit)".format(email)
|
||||||
# err_logger.info(msg)
|
err_logger.info(msg)
|
||||||
# raise forms.ValidationError('Email je již použit')
|
raise forms.ValidationError('Email je již použit')
|
||||||
#
|
|
||||||
# except ObjectDoesNotExist:
|
except ObjectDoesNotExist:
|
||||||
# pass
|
pass
|
||||||
# return email
|
return email
|
||||||
#def clean(self):
|
#def clean(self):
|
||||||
# super().clean()
|
# super().clean()
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue