Take value in a better way

pull/1065/head
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