mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-12-22 07:19:20 +08:00
fix: Resolve application list display error caused by docker-compose.yml modifications (#11065)
This commit is contained in:
parent
c3cc26a136
commit
938605a169
1 changed files with 12 additions and 2 deletions
|
|
@ -541,8 +541,18 @@ func handleUpgradeCompose(install model.AppInstall, detail model.AppDetail) (map
|
||||||
if !ok || oldValue == nil {
|
if !ok || oldValue == nil {
|
||||||
return nil, buserr.New("ErrFileParse")
|
return nil, buserr.New("ErrFileParse")
|
||||||
}
|
}
|
||||||
oldValueMap := oldValue.(map[string]interface{})
|
oldValueMap, ok := oldValue.(map[string]interface{})
|
||||||
oldServiceValue := oldValueMap[install.ServiceName].(map[string]interface{})
|
if !ok {
|
||||||
|
return nil, buserr.New("ErrFileParse")
|
||||||
|
}
|
||||||
|
oldServiceValueInterface, ok := oldValueMap[install.ServiceName]
|
||||||
|
if !ok || oldServiceValueInterface == nil {
|
||||||
|
return nil, buserr.New("ErrFileParse")
|
||||||
|
}
|
||||||
|
oldServiceValue, ok := oldServiceValueInterface.(map[string]interface{})
|
||||||
|
if !ok {
|
||||||
|
return nil, buserr.New("ErrFileParse")
|
||||||
|
}
|
||||||
if oldServiceValue["deploy"] != nil {
|
if oldServiceValue["deploy"] != nil {
|
||||||
serviceValue["deploy"] = oldServiceValue["deploy"]
|
serviceValue["deploy"] = oldServiceValue["deploy"]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue