fix 2year badge

pull/146/head
Aevann 2023-05-07 20:22:40 +03:00
parent 8ac8577081
commit a4d1fb411f
1 changed files with 2 additions and 2 deletions

View File

@ -419,12 +419,12 @@ class User(Base):
now = time.strftime("%d %b", time.gmtime())
if date == now: return True
if time.time() - self.created_utc > 365 * 86400 and not self.has_badge(134):
if time.time() - self.created_utc > 364 * 86400 and not self.has_badge(134):
new_badge = Badge(badge_id=134, user_id=self.id)
g.db.add(new_badge)
g.db.flush()
if time.time() - self.created_utc > 365 * 86400 * 2 and not self.has_badge(237):
if time.time() - self.created_utc > 364 * 86400 * 2 and not self.has_badge(237):
new_badge = Badge(badge_id=237, user_id=self.id)
g.db.add(new_badge)
g.db.flush()