From 53a884d23e33dff0e8f4884aa886022af43550e0 Mon Sep 17 00:00:00 2001 From: Verox001 Date: Tue, 5 Mar 2024 09:49:38 +0100 Subject: [PATCH] Fixed user None Check --- app.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app.py b/app.py index 240bd31..c863a20 100644 --- a/app.py +++ b/app.py @@ -554,10 +554,11 @@ def add_user(): # Check if user is already in the habit list already = False - for u in habit_list.get_users(): - if u.id == user.id: - already = True - break + if user: + for u in habit_list.get_users(): + if u.id == user.id: + already = True + break if already: errors['email'] = 'Teilnehmer ist bereits in der Liste.'