Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Fix 500 error when back-paginating search results #447

Merged
merged 1 commit into from
Dec 17, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions synapse/storage/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,10 @@ def search_rooms(self, room_ids, search_term, keys, limit, pagination_token=None
"(%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:
Expand Down