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

This commit is contained in:
zhengkunwang 2024-07-11 11:19:24 +08:00 committed by GitHub
parent e670e1f2e7
commit 89628fbbcc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 7 deletions

View File

@ -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
}

View File

@ -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)
}
}