Changed change_master_pass to be more readable
This commit is contained in:
parent
fb850e3737
commit
37a81ed22d
@ -7,10 +7,10 @@ from . import models
|
||||
def change_master_pass(
|
||||
engine: Engine, user_id: int, salt: bytes, passwd: bytes
|
||||
) -> None:
|
||||
statement = sqlmodel.update(
|
||||
models.MasterPass,
|
||||
models.MasterPass.user_id == user_id,
|
||||
{"salt": salt, "passwd": passwd},
|
||||
statement = (
|
||||
sqlmodel.update(models.MasterPass)
|
||||
.where(models.MasterPass.user_id == user_id)
|
||||
.values(salt=salt, passwd=passwd)
|
||||
)
|
||||
with sqlmodel.Session(engine) as session:
|
||||
session.exec(statement)
|
||||
|
Reference in New Issue
Block a user