Fixed a bug where some functions wouldn't return any data when adding a new user to the database
This commit is contained in:
parent
b30f90a002
commit
0268503cad
1 changed files with 2 additions and 2 deletions
|
@ -67,7 +67,7 @@ def get_watchlist(user):
|
|||
|
||||
if user not in data.keys():
|
||||
get_stocks(user)
|
||||
get_watchlist(user)
|
||||
return get_watchlist(user)
|
||||
|
||||
return data[user]['watchlist']
|
||||
|
||||
|
@ -77,7 +77,7 @@ def watch(user, stock, est_price=0):
|
|||
|
||||
if user not in data.keys():
|
||||
get_stocks(user)
|
||||
add_to_watchlist(user, list_name, stock)
|
||||
return add_to_watchlist(user, list_name, stock)
|
||||
|
||||
if not stock_exists(stock):
|
||||
return False
|
||||
|
|
Loading…
Add table
Reference in a new issue