Skip to content
Snippets Groups Projects
Commit 0e77d298 authored by Martin Mareš's avatar Martin Mareš
Browse files

Opravena editace orga orgem

parent c3c2505b
Branches
No related tags found
No related merge requests found
...@@ -390,6 +390,7 @@ def org_user_edit(id: int): ...@@ -390,6 +390,7 @@ def org_user_edit(id: int):
if form.validate_on_submit(): if form.validate_on_submit():
check = True check = True
if hasattr(form, 'email') and form.email is not None:
other_user = mo.users.user_by_email(form.email.data) other_user = mo.users.user_by_email(form.email.data)
if other_user is not None and other_user != user: 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') flash('Zadaný e-mail nelze použít, existuje jiný účet s tímto e-mailem', 'danger')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment