mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-24 16:19:25 -05:00
Don't use self.execute: it's designed for fetching stuff
This commit is contained in:
parent
32937f3ea0
commit
9eeb03c0dd
@ -112,10 +112,15 @@ class RegistrationStore(SQLBaseStore):
|
|||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def user_delete_access_tokens_apart_from(self, user_id, token_id):
|
def user_delete_access_tokens_apart_from(self, user_id, token_id):
|
||||||
yield self._execute(
|
yield self.runInteraction(
|
||||||
"delete_access_tokens_apart_from", None,
|
"user_delete_access_tokens_apart_from",
|
||||||
|
self._user_delete_access_tokens_apart_from, user_id, token_id
|
||||||
|
)
|
||||||
|
|
||||||
|
def _user_delete_access_tokens_apart_from(self, txn, user_id, token_id):
|
||||||
|
txn.execute(
|
||||||
"DELETE FROM access_tokens WHERE user_id = ? AND id != ?",
|
"DELETE FROM access_tokens WHERE user_id = ? AND id != ?",
|
||||||
user_id, token_id
|
(user_id, token_id)
|
||||||
)
|
)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
|
Loading…
Reference in New Issue
Block a user