From c65969dadda7ec6111f5c61f108c69b145a4c8ca Mon Sep 17 00:00:00 2001 From: Andrew Davis <1709934+Savid@users.noreply.github.com> Date: Fri, 28 Jul 2023 15:21:31 +1000 Subject: [PATCH] feat(server/coordinator): ignore empty geo data --- pkg/server/service/coordinator/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/server/service/coordinator/client.go b/pkg/server/service/coordinator/client.go index 8a782d38..b1c14acd 100644 --- a/pkg/server/service/coordinator/client.go +++ b/pkg/server/service/coordinator/client.go @@ -107,7 +107,7 @@ func (c *Client) CreateNodeRecords(ctx context.Context, req *xatu.CreateNodeReco c.log.WithField("ip", *ipAddress).WithError(err).Warn("failed to lookup geoip data") } - if geoipLookupResult != nil { + if geoipLookupResult != nil && pRecord.GeoCountryCode != nil { pRecord.GeoCity = &geoipLookupResult.CityName pRecord.GeoCountry = &geoipLookupResult.CountryName pRecord.GeoCountryCode = &geoipLookupResult.CountryCode