summary refs log tree commit diff
path: root/synapse/storage/state.py
diff options
context:
space:
mode:
authorDaniel Wagner-Hall <daniel@matrix.org>2015-08-28 15:35:39 +0100
committerDaniel Wagner-Hall <daniel@matrix.org>2015-08-28 15:35:39 +0100
commit4d1ea4000856cd29778da2616fb8f602892905e0 (patch)
tree68e4786675aa53586f31b27608f5acfe69a687af /synapse/storage/state.py
parentAllow users to redact their own events (diff)
parentMerge branch 'release-v0.10.0' into develop (diff)
downloadsynapse-4d1ea4000856cd29778da2616fb8f602892905e0.tar.xz
Merge branch 'develop' into redactyoself
Conflicts:
	synapse/handlers/_base.py
Diffstat (limited to 'synapse/storage/state.py')
-rw-r--r--synapse/storage/state.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/synapse/storage/state.py b/synapse/storage/state.py
index c9110e6304..9630efcfcc 100644
--- a/synapse/storage/state.py
+++ b/synapse/storage/state.py
@@ -403,8 +403,15 @@ class StateStore(SQLBaseStore):
                 state_dict = results[group]
 
             for event_id in state_ids:
-                state_event = state_events[event_id]
-                state_dict[(state_event.type, state_event.state_key)] = state_event
+                try:
+                    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(
                 cache_seq_num,