fix bug in deletions
This commit is contained in:
parent
523994ed26
commit
5f967bcde1
|
@ -145,7 +145,7 @@ func deleteModels[T Model](db *DB, m ...T) error {
|
|||
return err
|
||||
}
|
||||
|
||||
if res.MatchedCount == 0 && res.ModifiedCount == 0 && res.UpsertedCount == 0 {
|
||||
if res.DeletedCount == 0 {
|
||||
return errors.New("Failed to delete models properly")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue