mirror of https://github.com/1Panel-dev/1Panel
fix: 解决同步应用之后旧版本被删除的问题 (#1241)
parent
e504e55a34
commit
5a5b0e3a1b
|
@ -813,6 +813,12 @@ func (a AppService) SyncAppListFromRemote() error {
|
|||
if d.Status == constant.AppTakeDown {
|
||||
runtime, _ := runtimeRepo.GetFirst(runtimeRepo.WithDetailId(d.ID))
|
||||
if runtime != nil {
|
||||
updateDetails = append(updateDetails, d)
|
||||
continue
|
||||
}
|
||||
installs, _ := appInstallRepo.ListBy(appInstallRepo.WithDetailIdsIn([]uint{d.ID}))
|
||||
if len(installs) > 0 {
|
||||
updateDetails = append(updateDetails, d)
|
||||
continue
|
||||
}
|
||||
deleteDetails = append(deleteDetails, d)
|
||||
|
|
Loading…
Reference in New Issue