Skip to content

Commit

Permalink
BUG/MINOR: fix panic in Global CR DeepCopy
Browse files Browse the repository at this point in the history
  • Loading branch information
hdurand0710 committed Dec 15, 2023
1 parent d421ee3 commit 72314fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions crs/api/core/v1alpha1/global.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ func (in *GlobalSpec) DeepCopyInto(out *GlobalSpec) {
out.LogTargets = make([]*models.LogTarget, len(in.LogTargets))
for i, v := range in.LogTargets {
b, _ := v.MarshalBinary()
out.LogTargets[i] = &models.LogTarget{}
_ = out.LogTargets[i].UnmarshalBinary(b)
}
}
Expand Down
1 change: 1 addition & 0 deletions crs/api/core/v1alpha2/global.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ func (in *GlobalSpec) DeepCopyInto(out *GlobalSpec) {
out.LogTargets = make([]*models.LogTarget, len(in.LogTargets))
for i, v := range in.LogTargets {
b, _ := v.MarshalBinary()
out.LogTargets[i] = &models.LogTarget{}
_ = out.LogTargets[i].UnmarshalBinary(b)
}
}
Expand Down

0 comments on commit 72314fd

Please sign in to comment.