Fixed an error of getting wrong account

I'm now quite shure how it worked before
This commit is contained in:
StNicolay 2022-10-31 21:09:12 +03:00
parent 01ab461d28
commit ae2b214904

View File

@ -29,7 +29,7 @@ def get_account_info(
) -> tuple[bytes, bytes, bytes]:
"""Gets account info. Returns tuple of salt, login and password"""
statement = sqlmodel.select(models.Account).where(
models.Account.user_id == user_id and models.Account.name == name
models.Account.user_id == user_id, models.Account.name == name
)
with sqlmodel.Session(engine) as session:
result = session.exec(statement).first()