Skip to content

Commit 7036511

Browse files
committed
fix equal and use SetDeviationValue on BlameTreeElement
1 parent 0b10876 commit 7036511

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/tree/leaf_variants.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ func (lv *LeafVariants) GetDeviations(ch chan<- *types.DeviationEntry, isActiveC
427427
}
428428

429429
// if highest exists but not running OR running != highest
430-
if (running == nil && highest != nil) || running.Value().Cmp(highest.Value()) != 0 {
430+
if (running == nil && highest != nil) || !utils.EqualTypedValues(running.Value(), highest.Value()) {
431431
de := types.NewDeviationEntry(highest.Owner(), types.DeviationReasonNotApplied, sdcpbPath).SetExpectedValue(highest.Value())
432432
if running != nil {
433433
de.SetCurrentValue(running.Value())

pkg/tree/visitor_blame_config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func (b *BlameConfigVisitor) Visit(ctx context.Context, e Entry) error {
4242
runningLe := e.GetLeafVariantEntries().GetRunning()
4343
if runningLe != nil {
4444
if !proto.Equal(runningLe.Update.Value(), highestLe.Update.Value()) {
45-
result.DeviationValue = runningLe.Value()
45+
result.SetDeviationValue(runningLe.Value())
4646
}
4747
}
4848
} else {

0 commit comments

Comments
 (0)