Skip to content

Commit

Permalink
Merge pull request #1510 from flanksource/fix-nil-pointer
Browse files Browse the repository at this point in the history
fix: nil pointer
  • Loading branch information
moshloop authored Dec 20, 2023
2 parents 83ff292 + 17b1266 commit 1238cb7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ func (c Canary) GetCheckID(checkName string) string {

func (c Canary) ToV1() (*v1.Canary, error) {
annotations := c.Annotations
if annotations == nil {
annotations = make(types.JSONStringMap)
}
annotations["source"] = c.Source
canary := v1.Canary{
ObjectMeta: metav1.ObjectMeta{
Expand Down

0 comments on commit 1238cb7

Please sign in to comment.