Compare commits

...

1 Commits

Author SHA1 Message Date
dkeven
66c08d47a1 fix(app-service): check for nil annotations before assignment (#2163)
fix: check for nil annotations before assignment
2025-12-05 19:27:45 +08:00

View File

@@ -347,6 +347,9 @@ func (h *Handler) appUpgrade(req *restful.Request, resp *restful.Response) {
appCopy.Spec.Config = config
appCopy.Spec.OpType = appv1alpha1.UpgradeOp
if appCopy.Annotations == nil {
appCopy.Annotations = make(map[string]string)
}
appCopy.Annotations[api.AppRepoURLKey] = request.RepoURL
appCopy.Annotations[api.AppVersionKey] = request.Version
appCopy.Annotations[api.AppTokenKey] = token