From f4e17c5126ea1aec99a96409b198d209edab413f Mon Sep 17 00:00:00 2001 From: Ching Date: Sat, 11 May 2024 16:37:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=88=98=E6=8A=A5?= =?UTF-8?q?=E4=B8=AD=E6=B2=A1=E6=9C=89=E5=BC=80=E9=BB=91=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=20TUN-66?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dota.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dota.py b/dota.py index 9139ba3..479389d 100644 --- a/dota.py +++ b/dota.py @@ -220,8 +220,11 @@ def serialize_match_for_discord(match_): break win = is_radiant == match_['radiant_win'] if not match_['party_size']: - summary = f"??黑 {match_['duration']}" - elif match_['party_size'] > 1: + if Match.filter(match_id=match_['match_id']).exists(): + match_['party_size'] = Match.get(match_id=match_['match_id']).party_size + else: + summary = f"{match_['duration']}" + if match_['party_size'] > 1: summary = f"{match_['party_size']}黑 {match_['duration']}" else: summary = f"单排 {match_['duration']}"