Open glbert-does opened 1 year ago
not sure why this happened in these specific games, but maybe get_latest_game_metas in lichessapi.py should have an additional parameter for the round start and send a query parameter "since" to lichess as well, so we only receive games since the round started. that might be a good idea anyway.
edit: while we are at it, maybe we should add an additional filter "vs" as well, since we are only interested in games against one user. see https://lichess.org/api#tag/Games/operation/apiGamesUser for details.
edit 2: get_latest_game_metas is called from update_tv_state in tasks.py
in this pairing S34 R5: https://www.lichess4545.com/admin/tournament/playerpairing/77380/change/ heltour accidentally picked up the wrong game – https://lichess.org/LQJheBZu – which was actually played months earlier for S33 R6: https://www.lichess4545.com/admin/tournament/playerpairing/75410/change/ (same players, same colours)
this is a rare bug, definitely does not happen every time we get a repeat pairing. i believe i remember it happening before once, but i might be mistaken.
we fixed the problem manually by replacing the game link.