|
@ -199,7 +199,7 @@ class ProfileEditForm(forms.Form): |
|
|
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.exclude(user__username=self.username).get(email=email) |
|
|
msg = "Email {} exists (in edit)".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') |
|
|