Browse Source

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

pull/1248/head
zhengkunwang223 1 year ago committed by GitHub
parent
commit
5a5b0e3a1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      backend/app/service/app.go

6
backend/app/service/app.go

@ -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