dfssdf
This commit is contained in:
parent
0a1d812243
commit
1aa4351536
1 changed files with 2 additions and 6 deletions
|
@ -535,7 +535,7 @@ class User(Base):
|
||||||
|
|
||||||
return [x[0] for x in posts.offset(25 * (page - 1)).limit(26).all()]
|
return [x[0] for x in posts.offset(25 * (page - 1)).limit(26).all()]
|
||||||
|
|
||||||
def saved_comment_idlist(self, page=1):
|
def saved_comment_idlist(self):
|
||||||
|
|
||||||
saved = [x[0] for x in g.db.query(SaveRelationship.submission_id).options(lazyload('*')).filter(SaveRelationship.user_id == self.id).all()]
|
saved = [x[0] for x in g.db.query(SaveRelationship.submission_id).options(lazyload('*')).filter(SaveRelationship.user_id == self.id).all()]
|
||||||
comments = g.db.query(Comment.id).options(lazyload('*')).filter(Comment.id.in_(saved))
|
comments = g.db.query(Comment.id).options(lazyload('*')).filter(Comment.id.in_(saved))
|
||||||
|
@ -553,11 +553,7 @@ class User(Base):
|
||||||
Comment.author_id.notin_(blocked)
|
Comment.author_id.notin_(blocked)
|
||||||
)
|
)
|
||||||
|
|
||||||
ids = [x[0] for x in comments.order_by(Comment.created_utc.desc()).offset(25 * (page - 1)).limit(26).all()]
|
return [x[0] for x in comments.order_by(Comment.created_utc.desc()).all()]
|
||||||
|
|
||||||
print(ids)
|
|
||||||
|
|
||||||
return ids
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue