You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2018/05/03 18:53:26 UTC

[GitHub] rob05c opened a new pull request #2221: Fix TO Go CRConfig to omit null missLocations

rob05c opened a new pull request #2221: Fix TO Go CRConfig to omit null missLocations
URL: https://github.com/apache/incubator-trafficcontrol/pull/2221
 
 
   This fixed the Golang CRConfig to do what Perl does: omit the `missLocation` field if it's null in the database. 
   
   Specifically, the Go `MissLocation` field is `omitempty`, but was always being assigned an object (     `MissLocation:    &tc.CRConfigLatitudeLongitudeShort{}`). This changes it to only assign an object if the miss location exists.
   
   This also warns if Lat or Lon is set, but not both. This is different from Perl, which would put whichever was set in the CRConfig. It's never useful to have Lat without Lon, so IMO that should be considered a bug, and warned, which this does.
   
   Long term, we should make it impossible in the DB and UI to set Lat without Lon. But that's a bigger change.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services