Minor bugfixes
This commit is contained in:
parent
689c32abf0
commit
86dd9c6ff9
1 changed files with 2 additions and 1 deletions
3
mongo.py
3
mongo.py
|
@ -73,6 +73,7 @@ def delete_stock(user, stock):
|
|||
if stock in portfolio.stocks.keys():
|
||||
del portfolio.stocks[stock]
|
||||
portfolio.save()
|
||||
return get_stocks(user)
|
||||
|
||||
|
||||
# Watchlist Stuff
|
||||
|
@ -96,7 +97,7 @@ def watch(user, stock, est_price="0"):
|
|||
# Stock ticker does not exist on yahoo finance
|
||||
return False
|
||||
stock = encodeKey(stock)
|
||||
watchlist.stocks[stock] = Decimal128(est_price)
|
||||
watchlist.stocks[stock] = Decimal128(Decimal(est_price))
|
||||
watchlist.save()
|
||||
return True
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue