diff options
author | Erik Johnston <erik@matrix.org> | 2015-08-18 16:26:07 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-08-18 16:26:07 +0100 |
commit | 0bfdaf1f4fe73c6afd211a7744f82d8d0b2b1e9d (patch) | |
tree | bdea1aac6b2b2296486d1b0565f4df3e68f9c82a /synapse | |
parent | Ensure we never return a None event from _get_state_for_groups (diff) | |
download | synapse-0bfdaf1f4fe73c6afd211a7744f82d8d0b2b1e9d.tar.xz |
Rejig the code to make it nicer
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/storage/state.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/synapse/storage/state.py b/synapse/storage/state.py index b321412813..c831d8d389 100644 --- a/synapse/storage/state.py +++ b/synapse/storage/state.py @@ -398,6 +398,7 @@ class StateStore(SQLBaseStore): # for them again. state_dict = {key: None for key in types} state_dict.update(results[group]) + results[group] = state_dict else: state_dict = results[group] @@ -405,12 +406,10 @@ class StateStore(SQLBaseStore): state_event = state_events[event_id] state_dict[(state_event.type, state_event.state_key)] = state_event - results[group] = state_dict - self._state_group_cache.update( cache_seq_num, key=group, - value=results[group], + value=state_dict, full=(types is None), ) |