only remove existing dependents

also update patch-db submodule to pull in logging updates
This commit is contained in:
Chris Guida
2021-10-07 16:53:17 -06:00
committed by Aiden McClelland
parent a5f5852a31
commit 89dcf693e0
2 changed files with 9 additions and 2 deletions

View File

@@ -181,7 +181,14 @@ pub async fn remove_current_dependents<'a, Db: DbHandle, I: IntoIterator<Item =
.check(db)
.await?
{
current_dependents.remove(db, id).await?
if current_dependents
.clone()
.idx_model(id)
.exists(db, true)
.await?
{
current_dependents.remove(db, id).await?
}
}
}
Ok(())