|
|
@ -199,7 +199,7 @@ class ProfileEditForm(forms.Form): |
|
|
|
err_logger = logging.getLogger('seminar.prihlaska.problem') |
|
|
|
email = self.cleaned_data.get('email') |
|
|
|
try: |
|
|
|
Osoba.objects.get(email=email) |
|
|
|
Osoba.objects.exclude(user__username=self.username).get(email=email) |
|
|
|
msg = "Email {} exists (in edit)".format(email) |
|
|
|
err_logger.info(msg) |
|
|
|
raise forms.ValidationError('Email je již použit') |
|
|
|