Reformat SQL statement for clarity and wrap the long line.
This commit is contained in:
parent
237abe539a
commit
34ab6489ba
1 changed files with 9 additions and 1 deletions
|
@ -21,7 +21,15 @@ db_name = "mastodon"
|
||||||
|
|
||||||
# This is the query that pulls the password hash for the given user. Mastodon doesn't store the domain for local accounts in
|
# This is the query that pulls the password hash for the given user. Mastodon doesn't store the domain for local accounts in
|
||||||
# the database, so we ignore the host component and try to match username where the domain is NULL.
|
# the database, so we ignore the host component and try to match username where the domain is NULL.
|
||||||
db_query_getpass = "select users.encrypted_password as password from accounts inner join users on accounts.id=users.account_id where lower(accounts.username) = %(user)s and accounts.domain is null"
|
db_query_getpass = """
|
||||||
|
SELECT users.encrypted_password AS password
|
||||||
|
FROM accounts
|
||||||
|
INNER JOIN users
|
||||||
|
ON accounts.id = users.account_id
|
||||||
|
WHERE
|
||||||
|
lower(accounts.username) = %(user)s
|
||||||
|
AND accounts.domain IS NULL
|
||||||
|
"""
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
# Setup
|
# Setup
|
||||||
|
|
Loading…
Reference in a new issue