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