small fixes

This commit is contained in:
Alireza Ahmadi
2025-01-20 01:27:37 +01:00
parent f3432b119c
commit 60c64bab18
3 changed files with 5 additions and 7 deletions
+1 -1
View File
@@ -251,7 +251,7 @@ func (s *ClientService) UpdateClientsOnInboundDelete(tx *gorm.DB, id uint, tag s
func (s *ClientService) UpdateLinksByInboundChange(tx *gorm.DB, inbounIds []uint, hostname string) error {
var inbounds []model.Inbound
err := tx.Model(model.Inbound{}).Preload("Tls").Where("id in ? and type in ?", inbounIds, util.InboundTypeWithLink).Find(&inbounds).Error
if err != nil && err != gorm.ErrRecordNotFound {
if err != nil && database.IsNotFound(err) {
return err
}
for _, inbound := range inbounds {