diff --git a/app.py b/app.py index 746b62a..22c217c 100644 --- a/app.py +++ b/app.py @@ -627,7 +627,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