mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 14:08:06 +08:00
fix: 解决 PHP 运行环境网站恢复失败的问题 (#1903)
This commit is contained in:
parent
b8480e4928
commit
c0d8578466
@ -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)
|
return buserr.WithDetail(constant.ErrBackupMatch, fmt.Sprintf("oldName: %s, oldType: %v", oldWebsite.Alias, oldWebsite.Type), nil)
|
||||||
}
|
}
|
||||||
if oldWebsite.AppInstallID != 0 {
|
if oldWebsite.AppInstallID != 0 {
|
||||||
app, err := appInstallRepo.GetFirst(commonRepo.WithByID(website.AppInstallID))
|
_, err := appInstallRepo.GetFirst(commonRepo.WithByID(website.AppInstallID))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return buserr.WithDetail(constant.ErrBackupMatch, "app", 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 oldWebsite.RuntimeID != 0 {
|
||||||
if _, err := runtimeRepo.GetFirst(commonRepo.WithByID(website.RuntimeID)); err != nil {
|
if _, err := runtimeRepo.GetFirst(commonRepo.WithByID(website.RuntimeID)); err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user