fbreckle / go-netbox

Package netbox provides an API client for DigitalOcean's NetBox IPAM and DCIM service.
Other
1 stars 22 forks source link

🐛 Allow Latitude and Longitude to be set to an empty value #35

Closed haipersuccor02 closed 1 year ago

haipersuccor02 commented 1 year ago

We are having an issue with setting the Geo Coordinates to null when they were previously populated. The fields, longitude and latitude, on which the Geo Coordinates depend, are specified as "omitempty" in the model. As a result, these fields are omitted from encoding if longitude and latitude have empty values (set to 0.0) or if they are set to nil. Thus, the old values are retained even when we attempt to set them to null.

Also found this note that this has been a known issue: https://github.com/haipersuccor02/go-netbox/blob/empty_geocoordinates/README.md#changes-in-this-fork