File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ async def _fill_old_rating_and_count(_contest_record: ContestRecordPredict):
3939 ).delete ()
4040 unique_keys = set ()
4141 for contest_record_dict in contest_record_list :
42+ # TODO: LCUS changed API, now we have to use `user_slug`
43+ contest_record_dict ["username" ] = contest_record_dict ["user_slug" ]
4244 key = (contest_record_dict ["data_region" ], contest_record_dict ["username" ])
4345 if key in unique_keys :
4446 # during the contest, request_contest_ranking may return duplicated records (user ranking is changing)
@@ -82,6 +84,8 @@ async def save_archive_contest_records(
8284 )
8385 contest_records = list ()
8486 for contest_record_dict in contest_record_list :
87+ # TODO: LCUS changed API, now we have to use `user_slug`
88+ contest_record_dict ["username" ] = contest_record_dict ["user_slug" ]
8589 contest_record_dict .update ({"contest_name" : contest_name })
8690 contest_record = ContestRecordArchive .model_validate (contest_record_dict )
8791 contest_records .append (contest_record )
You can’t perform that action at this time.
0 commit comments