Skip to content

Commit

Permalink
Merge pull request #1168 from flanksource/err-fix-check-trans
Browse files Browse the repository at this point in the history
fix: handle nil assignment error for canary transformation
  • Loading branch information
moshloop authored Jul 20, 2023
2 parents e303757 + 93c92d7 commit 18b21dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions checks/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ func transform(ctx *context.Context, in *pkg.CheckResult) ([]*pkg.CheckResult, e
r := t.ToCheckResult()
r.Canary = in.Canary
r.Canary.Namespace = def(t.Namespace, r.Canary.Namespace)
if r.Canary.Labels == nil {
r.Canary.Labels = make(map[string]string)
}
for k, v := range t.Labels {
if r.Canary.Labels == nil {
r.Canary.Labels = make(map[string]string)
}
r.Canary.Labels[k] = v
}
// We use this label to set the transformed column to true
Expand Down

0 comments on commit 18b21dd

Please sign in to comment.