summary refs log tree commit diff
path: root/synapse/storage/registration.py
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2015-05-01 13:45:25 +0100
committerDavid Baker <dave@matrix.org>2015-05-01 13:45:54 +0100
commit92b20713d7c6346aeb20dc09963081e472752bb5 (patch)
tree0fa4ae7373cc339addc7c92ca104962b32298ff9 /synapse/storage/registration.py
parentOne too many lens (diff)
downloadsynapse-92b20713d7c6346aeb20dc09963081e472752bb5.tar.xz
More missed get_user_by_id API changes
Diffstat (limited to '')
-rw-r--r--synapse/storage/registration.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/storage/registration.py b/synapse/storage/registration.py
index 026ba217d6..9351342439 100644
--- a/synapse/storage/registration.py
+++ b/synapse/storage/registration.py
@@ -112,14 +112,14 @@ class RegistrationStore(SQLBaseStore):
 
     @defer.inlineCallbacks
     def user_delete_access_tokens_apart_from(self, user_id, token_id):
-        rows = yield self.get_user_by_id(user_id)
-        if len(rows) == 0:
+        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 != ?",
-            rows[0]['id'], token_id
+            user['id'], token_id
         )
 
     @defer.inlineCallbacks