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:
parent
2b0f8a9482
commit
a64f9bbfe0
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue