Change back formating for readability
parent
afe4cd7570
commit
db8368e6fb
|
@ -222,7 +222,15 @@ class database:
|
|||
add_links = []
|
||||
|
||||
creds_q = select(self.UsersTable)
|
||||
creds_q = creds_q.filter(self.UsersTable.c.id == user_id) if user_id else creds_q.filter(func.lower(self.UsersTable.c.credtype) == func.lower(credtype), func.lower(self.UsersTable.c.domain) == func.lower(domain), func.lower(self.UsersTable.c.username) == func.lower(username), self.UsersTable.c.password == password)
|
||||
if user_id: # noqa: SIM108
|
||||
creds_q = creds_q.filter(self.UsersTable.c.id == user_id)
|
||||
else:
|
||||
creds_q = creds_q.filter(
|
||||
func.lower(self.UsersTable.c.credtype) == func.lower(credtype),
|
||||
func.lower(self.UsersTable.c.domain) == func.lower(domain),
|
||||
func.lower(self.UsersTable.c.username) == func.lower(username),
|
||||
self.UsersTable.c.password == password,
|
||||
)
|
||||
users = self.conn.execute(creds_q)
|
||||
hosts = self.get_hosts(host)
|
||||
|
||||
|
|
Loading…
Reference in New Issue