mirror of https://github.com/1Panel-dev/1Panel
fix: 解决删除非面板 SSL 证书报错的问题 (#3218)
parent
48ed9d8993
commit
011ef0818d
|
@ -351,13 +351,10 @@ func (w WebsiteSSLService) Delete(ids []uint) error {
|
|||
if sslSetting.Value == "enable" {
|
||||
sslID, _ := settingRepo.Get(settingRepo.WithByKey("SSLID"))
|
||||
idValue, _ := strconv.Atoi(sslID.Value)
|
||||
if idValue > 0 {
|
||||
oldSSL, _ := websiteSSLRepo.GetFirst(commonRepo.WithByID(uint(idValue)))
|
||||
if oldSSL.ID > 0 {
|
||||
if idValue > 0 && uint(idValue) == id {
|
||||
return buserr.New("ErrDeleteWithPanelSSL")
|
||||
}
|
||||
}
|
||||
}
|
||||
_ = websiteSSLRepo.DeleteBy(commonRepo.WithByID(id))
|
||||
}
|
||||
if len(names) > 0 {
|
||||
|
|
Loading…
Reference in New Issue