mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 14:08:06 +08:00
fix: 解决 Openresty 获取状态异常的问题 (#2104)
This commit is contained in:
parent
d1e7b36243
commit
49e3d45912
@ -143,17 +143,16 @@ func (a *AppInstallService) CheckExist(req request.AppInstalledInfo) (*response.
|
||||
|
||||
var appInstall model.AppInstall
|
||||
if len(req.Name) == 0 {
|
||||
appInstall, _ := appInstallRepo.GetFirst(appInstallRepo.WithAppId(app.ID))
|
||||
if reflect.DeepEqual(appInstall, model.AppInstall{}) {
|
||||
return res, nil
|
||||
}
|
||||
if err := syncById(appInstall.ID); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
appInstall, _ = appInstallRepo.GetFirst(commonRepo.WithByID(appInstall.ID))
|
||||
appInstall, _ = appInstallRepo.GetFirst(appInstallRepo.WithAppId(app.ID))
|
||||
} else {
|
||||
appInstall, _ = appInstallRepo.GetFirst(commonRepo.WithByName(req.Name))
|
||||
}
|
||||
|
||||
if reflect.DeepEqual(appInstall, model.AppInstall{}) {
|
||||
return res, nil
|
||||
}
|
||||
if err = syncById(appInstall.ID); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
res.ContainerName = appInstall.ContainerName
|
||||
|
Loading…
x
Reference in New Issue
Block a user