fsd
This commit is contained in:
parent
f45c501a8e
commit
cb06fc98ec
6 changed files with 239 additions and 320 deletions
|
@ -208,11 +208,11 @@ def searchcomments(v):
|
|||
|
||||
|
||||
|
||||
comments = g.db.query(Comment.id).options(lazyload('*')).filter(Comment.parent_submission != None).join(Comment.comment_aux)
|
||||
comments = g.db.query(Comment.id).options(lazyload('*')).filter(Comment.parent_submission != None)
|
||||
|
||||
if 'q' in criteria:
|
||||
words=criteria['q'].split()
|
||||
words=[CommentAux.body.ilike('%'+x+'%') for x in words]
|
||||
words=[Comment.body.ilike('%'+x+'%') for x in words]
|
||||
words=tuple(words)
|
||||
comments=comments.filter(*words)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue