fix lock type escalation

This commit is contained in:
Aiden McClelland
2022-01-20 13:42:14 -07:00
committed by Aiden McClelland
parent 5b87aca298
commit 0b1f544fd7

View File

@@ -132,6 +132,10 @@ pub async fn cleanup_failed<Db: DbHandle>(
db: &mut Db,
id: &PackageId,
) -> Result<(), Error> {
crate::db::DatabaseModel::new()
.package_data()
.lock(db, LockType::Write)
.await?;
let pde = crate::db::DatabaseModel::new()
.package_data()
.idx_model(id)