summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-08-13 17:00:17 +0100
committerErik Johnston <erik@matrix.org>2015-08-13 17:00:17 +0100
commit57877b01d7dad613f4e1dc3fb99983320ea50d40 (patch)
tree1c44afcc0cc11c96bfc7e1e8108604aa7d253207 /synapse/storage
parentMerge branch 'develop' of github.com:matrix-org/synapse into erikj/dictionary... (diff)
downloadsynapse-57877b01d7dad613f4e1dc3fb99983320ea50d40.tar.xz
Replace list comprehension
Diffstat (limited to '')
-rw-r--r--synapse/storage/state.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/synapse/storage/state.py b/synapse/storage/state.py
index abc5b66431..1f5e62fa82 100644
--- a/synapse/storage/state.py
+++ b/synapse/storage/state.py
@@ -426,14 +426,9 @@ class StateStore(SQLBaseStore):
             else:
                 state_dict = results[group]
 
-            evs = [
-                state_events[e_id] for e_id in state_ids
-                if e_id in state_events  # This can happen if event is rejected.
-            ]
-            state_dict.update({
-                (e.type, e.state_key): e
-                for e in evs
-            })
+            for event_id in state_ids:
+                state_event = state_events[event_id]
+                state_dict[(state_event.type, state_event.state_key)] = state_event
 
             self._state_group_cache.update(
                 cache_seq_num,