fd
This commit is contained in:
parent
bf2df03942
commit
638cb74bb4
1 changed files with 1 additions and 6 deletions
|
@ -223,17 +223,12 @@ class User(Base, Stndrd, Age_times):
|
|||
return listing
|
||||
|
||||
def commentlisting(self, v=None, page=1, sort="new", t="all"):
|
||||
comments = self.comments.options(lazyload('*')).filter(Comment.parent_submission != None).join(Comment.post)
|
||||
comments = self.comments.options(lazyload('*')).filter(Comment.parent_submission != None)
|
||||
|
||||
if (not v) or (v.id != self.id and v.admin_level == 0):
|
||||
comments = comments.filter(Comment.deleted_utc == 0)
|
||||
comments = comments.filter(Comment.is_banned == False)
|
||||
|
||||
comments = comments.options(contains_eager(Comment.post))
|
||||
|
||||
if not (v and v.paid_dues):
|
||||
comments = comments.filter(Submission.club == False)
|
||||
|
||||
now = int(time.time())
|
||||
if t == 'hour':
|
||||
cutoff = now - 3600
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue