Browse Source

fix: 解决 PHP 运行环境网站恢复失败的问题 (#1903)

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

5
backend/app/service/backup_website.go

@ -221,13 +221,10 @@ func checkValidOfWebsite(oldWebsite, website *model.Website) error {
return buserr.WithDetail(constant.ErrBackupMatch, fmt.Sprintf("oldName: %s, oldType: %v", oldWebsite.Alias, oldWebsite.Type), nil)
}
if oldWebsite.AppInstallID != 0 {
app, err := appInstallRepo.GetFirst(commonRepo.WithByID(website.AppInstallID))
_, err := appInstallRepo.GetFirst(commonRepo.WithByID(website.AppInstallID))
if err != nil {
return buserr.WithDetail(constant.ErrBackupMatch, "app", nil)
}
if app.App.Type != "website" {
return buserr.WithDetail(constant.ErrBackupMatch, fmt.Sprintf("appType: %s", app.App.Type), nil)
}
}
if oldWebsite.RuntimeID != 0 {
if _, err := runtimeRepo.GetFirst(commonRepo.WithByID(website.RuntimeID)); err != nil {

Loading…
Cancel
Save