From 3dcf1d6f7a68cebab47040ae43a46db34a91a0d4 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 5 Nov 2021 23:44:43 +0200 Subject: [PATCH] dfsdfs --- files/classes/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/classes/user.py b/files/classes/user.py index e2bc7f3ab..707ce39e7 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -261,7 +261,7 @@ class User(Base): return g.db.query(User).options(lazyload('*')).filter_by(id=self.is_banned).first() def has_badge(self, badgedef_id): - return self.badges.filter_by(badge_id=badgedef_id).first() + return g.db.query(Badge).filter_by(user_id=self.id, badge_id=badgedef_id).first() def hash_password(self, password): return generate_password_hash(