mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 22:18:07 +08:00
fix: 解决网站备份恢复导致网站列表丢失的问题 (#4924)
This commit is contained in:
parent
7a6d0c5380
commit
395bc63946
@ -250,18 +250,18 @@ 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 {
|
||||||
_, err := appInstallRepo.GetFirst(commonRepo.WithByID(website.AppInstallID))
|
_, err := appInstallRepo.GetFirst(commonRepo.WithByID(oldWebsite.AppInstallID))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return buserr.WithDetail(constant.ErrBackupMatch, "app", nil)
|
return buserr.WithDetail(constant.ErrBackupMatch, "app", 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(oldWebsite.RuntimeID)); err != nil {
|
||||||
return buserr.WithDetail(constant.ErrBackupMatch, "runtime", nil)
|
return buserr.WithDetail(constant.ErrBackupMatch, "runtime", nil)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if oldWebsite.WebsiteSSLID != 0 {
|
if oldWebsite.WebsiteSSLID != 0 {
|
||||||
if _, err := websiteSSLRepo.GetFirst(commonRepo.WithByID(website.WebsiteSSLID)); err != nil {
|
if _, err := websiteSSLRepo.GetFirst(commonRepo.WithByID(oldWebsite.WebsiteSSLID)); err != nil {
|
||||||
return buserr.WithDetail(constant.ErrBackupMatch, "ssl", nil)
|
return buserr.WithDetail(constant.ErrBackupMatch, "ssl", nil)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
allow-create
|
allow-create
|
||||||
default-first-option
|
default-first-option
|
||||||
@change="updateParam"
|
@change="updateParam"
|
||||||
|
clearable
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="service in p.values"
|
v-for="service in p.values"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user