Jelajahi Sumber

Added PlayerDB refresh to buyout function

Mike Greene 9 bulan lalu
induk
melakukan
9cee4c705c
1 mengubah file dengan 1 tambahan dan 0 penghapusan
  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']