Fixed user None Check

This commit is contained in:
Verox001 2024-03-05 09:47:23 +01:00
parent 6337eaff81
commit 2a249a32e5

2
app.py
View File

@ -549,7 +549,7 @@ def add_user():
if not user:
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.'
# Check if user is already in the habit list