Fixed an error of deleting all passwords, instead of 1 with command delete_account
This commit is contained in:
parent
99c24d9917
commit
b7120f2627
@ -22,7 +22,7 @@ def delete_master_pass(engine: Engine, user_id: int) -> None:
|
||||
|
||||
def delete_account(engine: Engine, user_id: int, name: str) -> None:
|
||||
statement = sqlmodel.delete(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:
|
||||
session.exec(statement)
|
||||
|
Reference in New Issue
Block a user