From 5c685102ded303ebc051f2e9322b8287d4f36158 Mon Sep 17 00:00:00 2001 From: bbma <1051528468@qq.com> Date: Mon, 23 Oct 2023 13:44:21 +0800 Subject: [PATCH] fix: when helm application modify, but UpdateTime not update (#5948) * Fixed an issue where categories were not updated in the App Store after the app template was republished Signed-off-by: bingbing ma * fix: when helm application modify, but UpdateTime not update Signed-off-by: bingbing ma --------- Signed-off-by: bingbing ma Co-authored-by: bingbing ma --- pkg/models/openpitrix/applications.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/models/openpitrix/applications.go b/pkg/models/openpitrix/applications.go index 4bb9d1257..c05651668 100644 --- a/pkg/models/openpitrix/applications.go +++ b/pkg/models/openpitrix/applications.go @@ -469,6 +469,12 @@ func (c *applicationOperator) ModifyApp(appId string, request *ModifyAppRequest) return err } + _, err = c.appClient.UpdateStatus(context.TODO(), appCopy, metav1.UpdateOptions{}) + if err != nil { + klog.Errorf("update helm application status: %s failed, error: %s", appId, err) + return err + } + _, err = c.appClient.Patch(context.TODO(), appId, patch.Type(), data, metav1.PatchOptions{}) if err != nil { klog.Errorf("patch helm application: %s failed, error: %s", appId, err) @@ -478,6 +484,7 @@ func (c *applicationOperator) ModifyApp(appId string, request *ModifyAppRequest) } return err } + return nil }