diff options
author | Erik Johnston <erik@matrix.org> | 2016-09-05 14:57:14 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-09-05 14:57:14 +0100 |
commit | 70332a12dd0a2ea01e1f8f835dcb5ca15526a5f3 (patch) | |
tree | 49d53c94687b23c3631062668f37c9ce36973a39 /synapse/storage | |
parent | Comment about sqlite and WITH RECURSIVE (diff) | |
download | synapse-70332a12dd0a2ea01e1f8f835dcb5ca15526a5f3.tar.xz |
Take value in a better way
Diffstat (limited to 'synapse/storage')
-rw-r--r-- | synapse/storage/events.py | 2 | ||||
-rw-r--r-- | synapse/storage/state.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py index bec35ea68d..ed182c8d11 100644 --- a/synapse/storage/events.py +++ b/synapse/storage/events.py @@ -1616,7 +1616,7 @@ class EventsStore(SQLBaseStore): curr_state = self._get_state_groups_from_groups_txn( txn, [new_state_edge], types=None ) - curr_state = curr_state.values()[0] + curr_state = curr_state[new_state_edge] self._simple_delete_txn( txn, diff --git a/synapse/storage/state.py b/synapse/storage/state.py index e790793370..589a4fec6e 100644 --- a/synapse/storage/state.py +++ b/synapse/storage/state.py @@ -693,12 +693,12 @@ class StateStore(SQLBaseStore): prev_state = self._get_state_groups_from_groups_txn( txn, [prev_group], types=None ) - prev_state = prev_state.values()[0] + prev_state = prev_state[prev_group] curr_state = self._get_state_groups_from_groups_txn( txn, [state_group], types=None ) - curr_state = curr_state.values()[0] + curr_state = curr_state[state_group] if not set(prev_state.keys()) - set(curr_state.keys()): # We can only do a delta if the current has a strict super set |