Fix: update time of charts

Signed-off-by: LiHui <andrewli@yunify.com>
This commit is contained in:
LiHui
2021-04-09 16:51:25 +08:00
parent 6ef2a019c9
commit 5bb2884f76

View File

@@ -383,8 +383,13 @@ func convertAppVersion(in *v1alpha1.HelmApplicationVersion) *AppVersion {
}
// chart create time or update time
updateTime := strfmt.DateTime(in.Spec.Created.Time)
out.UpdateTime = &updateTime
if in.Spec.Created != nil {
updateTime := strfmt.DateTime(in.Spec.Created.Time)
out.UpdateTime = &updateTime
} else {
// Charts in the repo are without this field
out.UpdateTime = &date
}
if in.Spec.Metadata != nil {
out.Description = in.Spec.Description