Change back formating for readability

main
Alexander Neff 2023-10-26 21:34:36 +02:00
parent db8368e6fb
commit b2c63d569a
1 changed files with 8 additions and 1 deletions

View File

@ -267,7 +267,14 @@ class database:
add_links = []
creds_q = select(self.CredentialsTable)
creds_q = creds_q.filter(self.CredentialsTable.c.id == cred_id) if cred_id else creds_q.filter(func.lower(self.CredentialsTable.c.credtype) == func.lower(credtype), func.lower(self.CredentialsTable.c.username) == func.lower(username), self.CredentialsTable.c.password == secret)
if cred_id: # noqa: SIM108
creds_q = creds_q.filter(self.CredentialsTable.c.id == cred_id)
else:
creds_q = creds_q.filter(
func.lower(self.CredentialsTable.c.credtype) == func.lower(credtype),
func.lower(self.CredentialsTable.c.username) == func.lower(username),
self.CredentialsTable.c.password == secret,
)
creds = self.sess.execute(creds_q)
hosts = self.get_hosts(host_id)