forked from rDrama/rDrama
master
parent
fac1bc4a38
commit
8a4e41f450
|
@ -123,8 +123,6 @@ class User(Base, Stndrd, Age_times):
|
||||||
original_username = deferred(Column(String(255)))
|
original_username = deferred(Column(String(255)))
|
||||||
name_changed_utc = deferred(Column(Integer, default=0))
|
name_changed_utc = deferred(Column(Integer, default=0))
|
||||||
|
|
||||||
moderates = relationship("ModRelationship")
|
|
||||||
banned_from = relationship("BanRelationship", primaryjoin="BanRelationship.user_id==User.id")
|
|
||||||
subscriptions = relationship("Subscription")
|
subscriptions = relationship("Subscription")
|
||||||
|
|
||||||
following = relationship("Follow", primaryjoin="Follow.user_id==User.id")
|
following = relationship("Follow", primaryjoin="Follow.user_id==User.id")
|
||||||
|
@ -247,12 +245,7 @@ class User(Base, Stndrd, Age_times):
|
||||||
comments = comments.filter(Comment.deleted_utc == 0)
|
comments = comments.filter(Comment.deleted_utc == 0)
|
||||||
comments = comments.filter(Comment.is_banned == False)
|
comments = comments.filter(Comment.is_banned == False)
|
||||||
|
|
||||||
if v and v.admin_level >= 4:
|
if v and v.admin_level == 0:
|
||||||
pass
|
|
||||||
elif v:
|
|
||||||
m = g.db.query(ModRelationship).filter_by(user_id=v.id, invite_rescinded=False).subquery()
|
|
||||||
c = v.contributes.subquery()
|
|
||||||
|
|
||||||
comments = comments.filter(or_(Comment.author_id == v.id))
|
comments = comments.filter(or_(Comment.author_id == v.id))
|
||||||
|
|
||||||
comments = comments.options(contains_eager(Comment.post))
|
comments = comments.options(contains_eager(Comment.post))
|
||||||
|
|
Loading…
Reference in New Issue