diff --git a/dota.py b/dota.py index b55b4e0..5d48887 100644 --- a/dota.py +++ b/dota.py @@ -130,8 +130,10 @@ class Friend(BaseModel): } for match_ in matches[:limit]: duration = '%d:%02d:%02d' % utils.convert_seconds_to_hms(match_['duration']) - if match_['party_size'] > 1: + if match_['party_size'] and match_['party_size'] > 1: summary = f"{match_['party_size']}黑 {duration}" + elif match_['party_size'] == None: + summary = f"??黑 {duration}" else: summary = f"单排 {duration}"