fix bug in deletions

This commit is contained in:
Preston Baxter 2023-11-23 12:16:11 -06:00
parent 523994ed26
commit 5f967bcde1
1 changed files with 1 additions and 1 deletions

View File

@ -145,7 +145,7 @@ func deleteModels[T Model](db *DB, m ...T) error {
return err return err
} }
if res.MatchedCount == 0 && res.ModifiedCount == 0 && res.UpsertedCount == 0 { if res.DeletedCount == 0 {
return errors.New("Failed to delete models properly") return errors.New("Failed to delete models properly")
} }