浏览代码

Added PlayerDB refresh to buyout function

Mike Greene 9 月之前
父节点
当前提交
9cee4c705c
共有 1 个文件被更改,包括 1 次插入0 次删除
  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']