Actually check if event_id isn't returned by _get_state_groups

This commit is contained in:
Erik Johnston 2015-08-21 14:30:34 +01:00
parent 0f6a25f670
commit 1bd1a43073

View File

@ -403,8 +403,15 @@ class StateStore(SQLBaseStore):
state_dict = results[group] state_dict = results[group]
for event_id in state_ids: for event_id in state_ids:
state_event = state_events[event_id] try:
state_dict[(state_event.type, state_event.state_key)] = state_event state_event = state_events[event_id]
state_dict[(state_event.type, state_event.state_key)] = state_event
except KeyError:
# Hmm. So we do don't have that state event? Interesting.
logger.warn(
"Can't find state event %r for state group %r",
event_id, group,
)
self._state_group_cache.update( self._state_group_cache.update(
cache_seq_num, cache_seq_num,