Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
oanatmaria committed Nov 2, 2023
1 parent 9881bce commit 316525f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions model/diff/diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ func (d *Diff) Validate(dv Instances) error {
func (d *Diff) validateObjectTypes(objs []string, rels []*RelationKind) error {
var errs error
for _, objType := range d.Removed.Objects {
_, found := lo.Find(objs, func(obj string) bool { return obj == objType })
if found {
if lo.Contains(objs, objType) {
errs = multierror.Append(errs, errors.Wrapf(derr.ErrObjectTypeInUse, "object type [%s]", objType))
}
rel, found := lo.Find(rels, func(rel *RelationKind) bool { return rel.Object == objType || rel.Subject == objType })
Expand Down

0 comments on commit 316525f

Please sign in to comment.