Improved user addition
This commit is contained in:
parent
a8a3382f15
commit
1b665b8be0
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user