fix: 解决安装 mailserver 失败的问题 (#5756)

pull/5757/head
zhengkunwang 5 months ago committed by GitHub
parent e670e1f2e7
commit 89628fbbcc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -445,13 +445,6 @@ func (a AppService) Install(ctx context.Context, req request.AppInstallCreate) (
}
appInstall.Env = string(paramByte)
containerNames, err := getContainerNames(*appInstall)
if err != nil {
return
}
if len(containerNames) > 0 {
appInstall.ContainerName = strings.Join(containerNames, ",")
}
if err = appInstallRepo.Create(ctx, appInstall); err != nil {
return
}

@ -943,6 +943,13 @@ func upApp(appInstall *model.AppInstall, pullImages bool) {
}
exist, _ := appInstallRepo.GetFirst(commonRepo.WithByID(appInstall.ID))
if exist.ID > 0 {
containerNames, err := getContainerNames(*appInstall)
if err != nil {
return
}
if len(containerNames) > 0 {
appInstall.ContainerName = strings.Join(containerNames, ",")
}
_ = appInstallRepo.Save(context.Background(), appInstall)
}
}

Loading…
Cancel
Save