mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-12-18 05:19:19 +08:00
fix: 解决应用安装 services 为空报系统错误的问题 (#5445)
This commit is contained in:
parent
3b7f8c2724
commit
4209452e0b
3 changed files with 3 additions and 3 deletions
|
|
@ -367,7 +367,7 @@ func (a AppService) Install(ctx context.Context, req request.AppInstallCreate) (
|
||||||
}
|
}
|
||||||
|
|
||||||
value, ok := composeMap["services"]
|
value, ok := composeMap["services"]
|
||||||
if !ok {
|
if !ok || value == nil {
|
||||||
err = buserr.New(constant.ErrFileParse)
|
err = buserr.New(constant.ErrFileParse)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -449,7 +449,7 @@ func getUpgradeCompose(install model.AppInstall, detail model.AppDetail) (string
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
value, ok := composeMap["services"]
|
value, ok := composeMap["services"]
|
||||||
if !ok {
|
if !ok || value == nil {
|
||||||
return "", buserr.New(constant.ErrFileParse)
|
return "", buserr.New(constant.ErrFileParse)
|
||||||
}
|
}
|
||||||
servicesMap := value.(map[string]interface{})
|
servicesMap := value.(map[string]interface{})
|
||||||
|
|
|
||||||
|
|
@ -863,7 +863,7 @@ func changeServiceName(newComposeContent, newServiceName string) (composeByte []
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
value, ok := composeMap["services"]
|
value, ok := composeMap["services"]
|
||||||
if !ok {
|
if !ok || value == nil {
|
||||||
err = buserr.New(constant.ErrFileParse)
|
err = buserr.New(constant.ErrFileParse)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue