From 81fc0f28a6bf4f77660ea34db3d3809712426013 Mon Sep 17 00:00:00 2001 From: Ching Date: Thu, 8 Feb 2024 17:09:01 +0800 Subject: [PATCH] fix(models): Refactor Friend.select to Friend.filter in get_friends_recent_matches() function --- dota.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dota.py b/dota.py index 7d2f46e..64fd016 100644 --- a/dota.py +++ b/dota.py @@ -157,7 +157,7 @@ class Friend(BaseModel): def get_friends_recent_matches(): matches = [] - for friend in Friend.select(active=True): + for friend in Friend.filter(active=True): for match_ in friend.get_recent_matches(): if not Match.select().where(Match.match_id == match_.match_id).exists(): logger.info('create match, match info: %s' % match_.__dict__)