Take value in a better way

This commit is contained in:
Erik Johnston 2016-09-05 14:57:14 +01:00
parent 373654c635
commit 70332a12dd
2 changed files with 3 additions and 3 deletions

View file

@ -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,

View file

@ -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