0
0
Fork 1
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:
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),) "(%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: