summary refs log tree commit diff
path: root/synapse/storage/search.py
diff options
context:
space:
mode:
authorMark Haines <mjark@negativecurvature.net>2015-12-17 16:43:50 +0000
committerMark Haines <mjark@negativecurvature.net>2015-12-17 16:43:50 +0000
commit8b9f471d27447fd96de6dc3b8e3e480f224ac4c6 (patch)
treef157a395605381da7d931fd89de9d350d13ca2e7 /synapse/storage/search.py
parentFix typo (diff)
parentFix 500 error when back-paginating search results (diff)
downloadsynapse-8b9f471d27447fd96de6dc3b8e3e480f224ac4c6.tar.xz
Merge pull request #447 from matrix-org/rav/fix_search_pagination
Fix 500 error when back-paginating search results
Diffstat (limited to 'synapse/storage/search.py')
-rw-r--r--synapse/storage/search.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/storage/search.py b/synapse/storage/search.py
index 57c9cc1c5f..6cb5e73b6e 100644
--- a/synapse/storage/search.py
+++ b/synapse/storage/search.py
@@ -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: