diff --git a/ui/db/db.go b/ui/db/db.go index e664134..03b475c 100644 --- a/ui/db/db.go +++ b/ui/db/db.go @@ -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") }