Minor bugfixes

This commit is contained in:
socks 2021-03-08 14:27:50 +00:00
parent 689c32abf0
commit 86dd9c6ff9

View file

@ -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