add logic for 2 year badge
parent
3a8cff1e74
commit
ef8b7de749
|
@ -418,6 +418,11 @@ class User(Base):
|
|||
g.db.add(new_badge)
|
||||
g.db.flush()
|
||||
|
||||
if time.time() - self.created_utc > 365 * 86400 * 2 and not self.has_badge(236):
|
||||
new_badge = Badge(badge_id=236, user_id=self.id)
|
||||
g.db.add(new_badge)
|
||||
g.db.flush()
|
||||
|
||||
return False
|
||||
|
||||
@property
|
||||
|
|
Loading…
Reference in New Issue