Improved user addition

This commit is contained in:
Yapollon 2024-03-01 08:13:58 +01:00
parent a8a3382f15
commit 1b665b8be0

View File

@ -62,7 +62,10 @@ class HabitList:
# Adds a User by email to the HabitList
def add_user(self, email: str):
user = User.get_by_email(email)
if user:
add_user(self.id, user.id)
else:
return None
# Removes a User from the HabitList