mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-19 00:44:15 +01:00
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
1 changed files with 4 additions and 2 deletions
|
@ -286,8 +286,10 @@ class SearchStore(BackgroundUpdateStore):
|
||||||
"(%s)" % (" OR ".join(local_clauses),)
|
"(%s)" % (" OR ".join(local_clauses),)
|
||||||
)
|
)
|
||||||
|
|
||||||
count_args = args
|
# take copies of the current args and clauses lists, before adding
|
||||||
count_clauses = clauses
|
# pagination clauses to main query.
|
||||||
|
count_args = list(args)
|
||||||
|
count_clauses = list(clauses)
|
||||||
|
|
||||||
if pagination_token:
|
if pagination_token:
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue