diff options
author | Amber Brown <hawkowl@atleastfornow.net> | 2018-05-31 19:03:47 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-31 19:03:47 +1000 |
commit | c936a52a9eb18e302fbd5158da7188f674912530 (patch) | |
tree | ce74f2a73cc4730199dfca39420a5564f36daab7 /synapse/storage/search.py | |
parent | Merge pull request #3303 from NotAFile/py3-memoryview (diff) | |
download | synapse-c936a52a9eb18e302fbd5158da7188f674912530.tar.xz |
Consistently use six's iteritems and wrap lazy keys/values in list() if they're not meant to be lazy (#3307)
Diffstat (limited to 'synapse/storage/search.py')
-rw-r--r-- | synapse/storage/search.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/search.py b/synapse/storage/search.py index a9c299a861..f0fa5d7631 100644 --- a/synapse/storage/search.py +++ b/synapse/storage/search.py @@ -448,7 +448,7 @@ class SearchStore(BackgroundUpdateStore): "search_msgs", self.cursor_to_dict, sql, *args ) - results = filter(lambda row: row["room_id"] in room_ids, results) + results = list(filter(lambda row: row["room_id"] in room_ids, results)) events = yield self._get_events([r["event_id"] for r in results]) @@ -603,7 +603,7 @@ class SearchStore(BackgroundUpdateStore): "search_rooms", self.cursor_to_dict, sql, *args ) - results = filter(lambda row: row["room_id"] in room_ids, results) + results = list(filter(lambda row: row["room_id"] in room_ids, results)) events = yield self._get_events([r["event_id"] for r in results]) |