diff --git a/internal/logic/admin/server/updateServerLogic.go b/internal/logic/admin/server/updateServerLogic.go index f419130..fa3f6aa 100644 --- a/internal/logic/admin/server/updateServerLogic.go +++ b/internal/logic/admin/server/updateServerLogic.go @@ -39,7 +39,7 @@ func (l *UpdateServerLogic) UpdateServer(req *types.UpdateServerRequest) error { data.Country = req.Country data.City = req.City // only update address when it's different - if req.Address != data.Address { + if req.Address != data.Address || (data.Country == "" || req.Country == "") { // query server ip location result, err := ip.GetRegionByIp(req.Address) if err != nil {