From 72013dcb4376f1863de808b248878b09e1ce7710 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 4 Jul 2022 03:05:26 +0200 Subject: [PATCH] fix 500 error --- files/classes/user.py | 1 + 1 file changed, 1 insertion(+) diff --git a/files/classes/user.py b/files/classes/user.py index f84099d7c..c136a1720 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -222,6 +222,7 @@ class User(Base): if not self.has_badge(134): new_badge = Badge(badge_id=134, user_id=self.id) g.db.add(new_badge) + g.db.flush() return True return False