exclude dwhite
parent
57b7c1ae8d
commit
8575eb6d8d
|
@ -1310,14 +1310,14 @@ class User(Base):
|
||||||
@property
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
def user_name(self):
|
def user_name(self):
|
||||||
random.seed(self.id)
|
if self.id != 2249:
|
||||||
uid = random.choice(USER_IDS)
|
random.seed(self.id)
|
||||||
|
uid = random.choice(USER_IDS)
|
||||||
|
to_load = [User.username]
|
||||||
|
if SITE_NAME == 'rDrama':
|
||||||
|
to_load.append(User.earlylife)
|
||||||
|
self = g.db.query(User).options(load_only(*to_load)).filter_by(id=uid).one()
|
||||||
|
|
||||||
to_load = [User.username]
|
|
||||||
if SITE_NAME == 'rDrama':
|
|
||||||
to_load.append(User.earlylife)
|
|
||||||
|
|
||||||
self = g.db.query(User).options(load_only(*to_load)).filter_by(id=uid).one()
|
|
||||||
if self.earlylife:
|
if self.earlylife:
|
||||||
expiry = int(self.earlylife - time.time())
|
expiry = int(self.earlylife - time.time())
|
||||||
if expiry > 86400:
|
if expiry > 86400:
|
||||||
|
@ -1331,6 +1331,9 @@ class User(Base):
|
||||||
@property
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
def switched(self):
|
def switched(self):
|
||||||
|
if self.id == 2249:
|
||||||
|
return self
|
||||||
|
|
||||||
random.seed(self.id)
|
random.seed(self.id)
|
||||||
uid = random.choice(USER_IDS)
|
uid = random.choice(USER_IDS)
|
||||||
return g.db.query(User).filter_by(id=uid).one()
|
return g.db.query(User).filter_by(id=uid).one()
|
||||||
|
|
Loading…
Reference in New Issue