From bc6e57b91de3548a8ab42b13e80513f2af180d99 Mon Sep 17 00:00:00 2001 From: vrubel Date: Mon, 15 Jun 2026 17:43:34 +0000 Subject: [PATCH] =?UTF-8?q?=D0=94=D1=83=D0=B1=D0=BB=D0=B8=D1=80=D1=83?= =?UTF-8?q?=D1=8E=D1=89=D0=B8=D0=B9=20=D0=BF=D0=B5=D1=80=D0=B5=D1=81=D1=87?= =?UTF-8?q?=D1=91=D1=82=20=D0=BE=D1=87=D0=BA=D0=BE=D0=B2=20=D0=B2=20fetch?= =?UTF-8?q?=5Ftournament=20=D0=B4=D0=BB=D1=8F=20=D0=BD=D0=B0=D0=B4=D1=91?= =?UTF-8?q?=D0=B6=D0=BD=D0=BE=D1=81=D1=82=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- swiss_calc/parser.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/swiss_calc/parser.py b/swiss_calc/parser.py index f1b408b..a1da9b8 100644 --- a/swiss_calc/parser.py +++ b/swiss_calc/parser.py @@ -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'],