From 7693f24792d161c4c161de4a8b6e9d3538837284 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 1 May 2015 13:55:42 +0100 Subject: [PATCH] No id field on user --- synapse/storage/registration.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/synapse/storage/registration.py b/synapse/storage/registration.py index 935134243..ff0a2a9e8 100644 --- a/synapse/storage/registration.py +++ b/synapse/storage/registration.py @@ -112,14 +112,10 @@ class RegistrationStore(SQLBaseStore): @defer.inlineCallbacks def user_delete_access_tokens_apart_from(self, user_id, token_id): - user = yield self.get_user_by_id(user_id) - if not user: - raise Exception("No such user!") - yield self._execute( "delete_access_tokens_apart_from", None, "DELETE FROM access_tokens WHERE user_id = ? AND id != ?", - user['id'], token_id + user_id, token_id ) @defer.inlineCallbacks