From c0d8578466e98af50a1d8bef2500b0883886166a Mon Sep 17 00:00:00 2001 From: zhengkunwang <31820853+zhengkunwang223@users.noreply.github.com> Date: Thu, 10 Aug 2023 10:42:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=20PHP=20=E8=BF=90?= =?UTF-8?q?=E8=A1=8C=E7=8E=AF=E5=A2=83=E7=BD=91=E7=AB=99=E6=81=A2=E5=A4=8D?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E7=9A=84=E9=97=AE=E9=A2=98=20(#1903)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/service/backup_website.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/backend/app/service/backup_website.go b/backend/app/service/backup_website.go index 657153fc1..27d78c847 100644 --- a/backend/app/service/backup_website.go +++ b/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 {