Browse Source

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

pull/5757/head
zhengkunwang 4 months ago committed by GitHub
parent
commit
89628fbbcc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 7
      backend/app/service/app.go
  2. 7
      backend/app/service/app_utils.go

7
backend/app/service/app.go

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

7
backend/app/service/app_utils.go

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