fix the logic

This commit is contained in:
UncleJim 2023-11-19 11:54:04 +00:00
parent 9605c13e8e
commit 25ab37561d

View File

@ -2388,11 +2388,13 @@ class IDACSeason2(IDACBase):
vs_info["lose_now"] += 1 if data.get("win_flg") == 0 else 0
vs_info["break_count"] += data.get("break_count")
vs_info["break_penalty_flag"] = data.get("break_penalty_flag")
course_exists = 0
for course in vs_info["vsinfo_course_data"]:
if course["course_id"] == data.get("course_id"):
course["vs_cnt"] += 1
course["vs_win"] += data.get("win_flg")
else:
course_exists = 1
if course_exists == 0:
course = {}
course["course_id"] = data.get("course_id")
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["break_count"] += data.get("break_count")
vs_info["break_penalty_flag"] = data.get("break_penalty_flag")
course_exists = 0
for course in vs_info["vsinfo_course_data"]:
if course["course_id"] == data.get("course_id"):
course["vs_cnt"] += 1
course["vs_win"] += data.get("win_flg")
else:
course_exists = 1
if course_exists == 0:
course = {}
course["course_id"] = data.get("course_id")
course["vs_cnt"] = 1