Fixed user None Check
This commit is contained in:
parent
6337eaff81
commit
2a249a32e5
2
app.py
2
app.py
@ -549,7 +549,7 @@ def add_user():
|
|||||||
if not user:
|
if not user:
|
||||||
errors['email'] = 'E-Mail Adresse nicht gefunden.'
|
errors['email'] = 'E-Mail Adresse nicht gefunden.'
|
||||||
|
|
||||||
if user.id == current_user.id:
|
if user and user.id == current_user.id:
|
||||||
errors['email'] = 'Du kannst dich nicht selbst hinzufügen.'
|
errors['email'] = 'Du kannst dich nicht selbst hinzufügen.'
|
||||||
|
|
||||||
# Check if user is already in the habit list
|
# Check if user is already in the habit list
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user