xjc 5 mesiacov pred
rodič
commit
62829a9b30
1 zmenil súbory, kde vykonal 4 pridanie a 0 odobranie
  1. 4 0
      src/weixin/controls.py

+ 4 - 0
src/weixin/controls.py

@@ -795,6 +795,10 @@ def add_model(cls,**kwargs):
                             name = ts["name"] 
                         )
                         stock_id = stock.id
+                        try:
+                            cm.UserStock.objects.filter(stock_id=stock_id,player_id=player.id,stock_date=stock_date).delete()
+                        except Exception as e:
+                            print(e)
                         usobj,flag = cm.UserStock.objects.get_or_create(
                             stock_id = stock_id,
                             player_id = player.id,