Mirror of @tangled.org/core. Running on a Raspberry Pi Zero 2 (Please be gentle).
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

oppiliappan and committed by
Tangled
20ba1adb 8ccc8b6c

+3 -3
+3 -3
appview/labels/labels.go
··· 162 162 } 163 163 } 164 164 165 - // reduce the opset 166 - labelOps = models.ReduceLabelOps(labelOps) 167 - 168 165 for i := range labelOps { 169 166 def := actx.Defs[labelOps[i].OperandKey] 170 167 if err := l.validator.ValidateLabelOp(def, repo, &labelOps[i]); err != nil { ··· 169 172 return 170 173 } 171 174 } 175 + 176 + // reduce the opset 177 + labelOps = models.ReduceLabelOps(labelOps) 172 178 173 179 // next, apply all ops introduced in this request and filter out ones that are no-ops 174 180 validLabelOps := labelOps[:0]