Merge pull request #447 from matrix-org/rav/fix_search_pagination

Fix 500 error when back-paginating search results
This commit is contained in:
Mark Haines 2015-12-17 16:43:50 +00:00
commit 8b9f471d27

View file

@ -286,8 +286,10 @@ class SearchStore(BackgroundUpdateStore):
"(%s)" % (" OR ".join(local_clauses),)
)
count_args = args
count_clauses = clauses
# take copies of the current args and clauses lists, before adding
# pagination clauses to main query.
count_args = list(args)
count_clauses = list(clauses)
if pagination_token:
try: