diff --git a/appview/labels/labels.go b/appview/labels/labels.go index aab675ba..94860917 100644 --- a/appview/labels/labels.go +++ b/appview/labels/labels.go @@ -162,9 +162,6 @@ func (l *Labels) PerformLabelOp(w http.ResponseWriter, r *http.Request) { } } - // 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 { @@ -173,6 +170,9 @@ func (l *Labels) PerformLabelOp(w http.ResponseWriter, r *http.Request) { } } + // 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] for _, op := range labelOps {