fix 500 error

master
Aevann1 2022-09-04 20:50:59 +02:00
parent 862b9ebad9
commit 1acfb0a2cd
1 changed files with 1 additions and 0 deletions

View File

@ -256,6 +256,7 @@ class User(Base):
date = time.strftime("%d %b", time.gmtime(self.created_utc)) date = time.strftime("%d %b", time.gmtime(self.created_utc))
now = time.strftime("%d %b", time.gmtime()) now = time.strftime("%d %b", time.gmtime())
if date == now: if date == now:
g.db.flush()
if not self.has_badge(134): if not self.has_badge(134):
new_badge = Badge(badge_id=134, user_id=self.id) new_badge = Badge(badge_id=134, user_id=self.id)
g.db.add(new_badge) g.db.add(new_badge)