fix: 解决同步应用之后旧版本被删除的问题 (#1241)

pull/1248/head
zhengkunwang223 2 years ago committed by GitHub
parent e504e55a34
commit 5a5b0e3a1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save