Ver Fonte

Added PlayerDB refresh to buyout function

Mike Greene há 9 meses atrás
pai
commit
9cee4c705c
1 ficheiros alterados com 1 adições e 0 exclusões
  1. 1 0
      db.py

+ 1 - 0
db.py

@@ -61,6 +61,7 @@ def plot(card=None,columns=['cost','cost-min','cost-max'],maxCost=None):
     
 def buyout():
     today=datetime.utcnow().strftime('%Y-%m-%d')
+    PlayerDB = TinyDB('player.json')
     PlayerCards=PlayerDB.search(Query().fragment({'date':today}))
     Stock=[None]*152
     for card in PlayerCards: Stock[card['card-num']]=card['stock']