Skip to content

Commit

Permalink
fix: 解决网站备份恢复导致网站列表丢失的问题 (1Panel-dev#4924)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengkunwang223 authored May 8, 2024
1 parent 155d7d6 commit bbe0c54
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend/app/service/backup_website.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
if oldWebsite.AppInstallID != 0 {
_, err := appInstallRepo.GetFirst(commonRepo.WithByID(website.AppInstallID))
_, err := appInstallRepo.GetFirst(commonRepo.WithByID(oldWebsite.AppInstallID))
if err != nil {
return buserr.WithDetail(constant.ErrBackupMatch, "app", nil)
}
}
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)
}
}
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)
}
}
Expand Down
1 change: 1 addition & 0 deletions frontend/src/views/website/runtime/php/edit/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
allow-create
default-first-option
@change="updateParam"
clearable
>
<el-option
v-for="service in p.values"
Expand Down

0 comments on commit bbe0c54

Please sign in to comment.