diff --git a/mo/web/org_users.py b/mo/web/org_users.py index a236bba1502378010337da9096247c6fb83d5ab8..97cd77b7c00d3da7a3af33a384d71e45b608e581 100644 --- a/mo/web/org_users.py +++ b/mo/web/org_users.py @@ -390,7 +390,8 @@ def org_user_edit(id: int): if form.validate_on_submit(): check = True - if mo.users.user_by_email(form.email.data) is not None: + other_user = mo.users.user_by_email(form.email.data) + if other_user is not None and other_user != user: flash('Zadaný e-mail nelze použít, existuje jiný účet s tímto e-mailem', 'danger') check = False