Fix 500 error when back-paginating search results

We were mistakenly adding pagination clauses to the count query, which then
failed because the count query doesn't join to the events table.
This commit is contained in:
Richard van der Hoff 2015-12-17 12:47:26 +00:00
parent 2b0f8a9482
commit a64f9bbfe0

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: