summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2020-10-21 10:32:37 +0100
committerErik Johnston <erik@matrix.org>2020-10-21 10:32:37 +0100
commit03076254e367b411bb4ea9a993dc29b50b082224 (patch)
treec5e175e2cf0bdbd249ad5eda6dfba52cadc7e21a /synapse
parentDon't instansiate Requester directly (diff)
downloadsynapse-03076254e367b411bb4ea9a993dc29b50b082224.tar.xz
Format SQL
Diffstat (limited to 'synapse')
-rw-r--r--synapse/storage/databases/main/registration.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/synapse/storage/databases/main/registration.py b/synapse/storage/databases/main/registration.py

index 4c843b7679..80d9606783 100644 --- a/synapse/storage/databases/main/registration.py +++ b/synapse/storage/databases/main/registration.py
@@ -328,13 +328,17 @@ class RegistrationWorkerStore(SQLBaseStore): await self.db_pool.runInteraction("set_server_admin", set_server_admin_txn) def _query_for_auth(self, txn, token): - sql = ( - "SELECT users.name, users.is_guest, users.shadow_banned, access_tokens.id as token_id," - " access_tokens.device_id, access_tokens.valid_until_ms" - " FROM users" - " INNER JOIN access_tokens on users.name = access_tokens.user_id" - " WHERE token = ?" - ) + sql = """ + SELECT users.name, + users.is_guest, + users.shadow_banned, + access_tokens.id as token_id, + access_tokens.device_id, + access_tokens.valid_until_ms + FROM users + INNER JOIN access_tokens on users.name = access_tokens.user_id + WHERE token = ? + """ txn.execute(sql, (token,)) rows = self.db_pool.cursor_to_dict(txn)