|
@@ -1953,6 +1953,9 @@ def get_stock_players(**kwargs):
|
|
|
today_record["total_income"] = "{}%".format(today_record["total_income"]*100)
|
|
|
#today_record["cur_stock_fund"] = 0.0
|
|
|
for item in today_record["today_stock"]:
|
|
|
+ if 'stock_id' not in item:
|
|
|
+ today_record["cur_stock_fund"] = 0.0
|
|
|
+ continue
|
|
|
if int(item["stock_id"]) == int(stock_id):
|
|
|
today_record["cur_stock_fund"] = float(item["fund"]) if item["fund"] else 0.0
|
|
|
else:
|
|
@@ -2071,8 +2074,10 @@ def get_mine_latest(request):
|
|
|
"""
|
|
|
try:
|
|
|
user_id = request.user.get("id")
|
|
|
-
|
|
|
+ cur_match_id = ccc.get_cur_match().id
|
|
|
match_id = ccc.cache.hget("PLAYER_LATEST_%d" % user_id,"match_id")
|
|
|
+ if cur_match_id != int(match_id):
|
|
|
+ return {"player_id":user_id,"match_id":match_id,"user_id":user_id}
|
|
|
match_group = ccc.cache.hget("PLAYER_LATEST_%d" % user_id,"match_group")
|
|
|
_today = ccc.cache.hget("PLAYER_LATEST_%d" % user_id,"stock_date")
|
|
|
if _today:
|