Replace list comprehension

This commit is contained in:
Erik Johnston 2015-08-13 17:00:17 +01:00
parent 06750140f6
commit 57877b01d7
1 changed files with 3 additions and 8 deletions

View File

@ -426,14 +426,9 @@ class StateStore(SQLBaseStore):
else: else:
state_dict = results[group] state_dict = results[group]
evs = [ for event_id in state_ids:
state_events[e_id] for e_id in state_ids state_event = state_events[event_id]
if e_id in state_events # This can happen if event is rejected. state_dict[(state_event.type, state_event.state_key)] = state_event
]
state_dict.update({
(e.type, e.state_key): e
for e in evs
})
self._state_group_cache.update( self._state_group_cache.update(
cache_seq_num, cache_seq_num,