forked from tangled.org/core
this repo has no description

appview/labels: reduce the opset after validation

validation also performs a transformation upon labels: it resolves
handles to DIDs, it is important that this transform be present when
determining redundant ops.

Signed-off-by: oppiliappan <me@oppi.li>

Changed files
+3 -3
appview
labels
+3 -3
appview/labels/labels.go
···
}
}
-
// reduce the opset
-
labelOps = models.ReduceLabelOps(labelOps)
-
for i := range labelOps {
def := actx.Defs[labelOps[i].OperandKey]
if err := l.validator.ValidateLabelOp(def, repo, &labelOps[i]); err != nil {
···
return
}
}
+
+
// reduce the opset
+
labelOps = models.ReduceLabelOps(labelOps)
// next, apply all ops introduced in this request and filter out ones that are no-ops
validLabelOps := labelOps[:0]