From 1acfb0a2cd0be3f89c75b8923cac659c02ca651c Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 4 Sep 2022 20:50:59 +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 de609deb3..408c8d67d 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -256,6 +256,7 @@ class User(Base): date = time.strftime("%d %b", time.gmtime(self.created_utc)) now = time.strftime("%d %b", time.gmtime()) if date == now: + g.db.flush() if not self.has_badge(134): new_badge = Badge(badge_id=134, user_id=self.id) g.db.add(new_badge)