Дублирующий пересчёт очков в fetch_tournament для надёжности
All checks were successful
CI/CD Pipeline / build-and-deploy (push) Successful in 5s

This commit is contained in:
vrubel 2026-06-15 17:43:34 +00:00
parent 98a8febf37
commit bc6e57b91d

View file

@ -460,13 +460,15 @@ def fetch_tournament(url: str) -> dict:
if res_copy.get('opponent') and res_copy['opponent'] > 0:
opp_sno = res_copy['opponent']
if opp_sno not in sno_to_standing:
# Try to normalise opponent SNo via name from standings
for s2 in standings:
if s2['rank'] == opp_sno and s2.get('starting_sno'):
res_copy['opponent'] = s2['starting_sno']
break
s['results'].append(res_copy)
for s in standings:
s['points'] = sum(r.get('score', 0) for r in s.get('results', []))
return {
'name': meta['name'],
'num_rounds': meta['num_rounds'],