forked from Hay1tsme/artemis
fix the logic
This commit is contained in:
parent
9605c13e8e
commit
25ab37561d
@ -2388,11 +2388,13 @@ class IDACSeason2(IDACBase):
|
|||||||
vs_info["lose_now"] += 1 if data.get("win_flg") == 0 else 0
|
vs_info["lose_now"] += 1 if data.get("win_flg") == 0 else 0
|
||||||
vs_info["break_count"] += data.get("break_count")
|
vs_info["break_count"] += data.get("break_count")
|
||||||
vs_info["break_penalty_flag"] = data.get("break_penalty_flag")
|
vs_info["break_penalty_flag"] = data.get("break_penalty_flag")
|
||||||
|
course_exists = 0
|
||||||
for course in vs_info["vsinfo_course_data"]:
|
for course in vs_info["vsinfo_course_data"]:
|
||||||
if course["course_id"] == data.get("course_id"):
|
if course["course_id"] == data.get("course_id"):
|
||||||
course["vs_cnt"] += 1
|
course["vs_cnt"] += 1
|
||||||
course["vs_win"] += data.get("win_flg")
|
course["vs_win"] += data.get("win_flg")
|
||||||
else:
|
course_exists = 1
|
||||||
|
if course_exists == 0:
|
||||||
course = {}
|
course = {}
|
||||||
course["course_id"] = data.get("course_id")
|
course["course_id"] = data.get("course_id")
|
||||||
course["vs_cnt"] = 1
|
course["vs_cnt"] = 1
|
||||||
@ -2509,11 +2511,13 @@ class IDACSeason2(IDACBase):
|
|||||||
vs_info["lose_now"] += 1 if data.get("win_flg") == 0 else 0
|
vs_info["lose_now"] += 1 if data.get("win_flg") == 0 else 0
|
||||||
vs_info["break_count"] += data.get("break_count")
|
vs_info["break_count"] += data.get("break_count")
|
||||||
vs_info["break_penalty_flag"] = data.get("break_penalty_flag")
|
vs_info["break_penalty_flag"] = data.get("break_penalty_flag")
|
||||||
|
course_exists = 0
|
||||||
for course in vs_info["vsinfo_course_data"]:
|
for course in vs_info["vsinfo_course_data"]:
|
||||||
if course["course_id"] == data.get("course_id"):
|
if course["course_id"] == data.get("course_id"):
|
||||||
course["vs_cnt"] += 1
|
course["vs_cnt"] += 1
|
||||||
course["vs_win"] += data.get("win_flg")
|
course["vs_win"] += data.get("win_flg")
|
||||||
else:
|
course_exists = 1
|
||||||
|
if course_exists == 0:
|
||||||
course = {}
|
course = {}
|
||||||
course["course_id"] = data.get("course_id")
|
course["course_id"] = data.get("course_id")
|
||||||
course["vs_cnt"] = 1
|
course["vs_cnt"] = 1
|
||||||
|
Loading…
Reference in New Issue
Block a user