This is an automated email from the ASF dual-hosted git repository. ocket8888 pushed a commit to branch 5.0.x in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git
commit 5da7a3998df822d199d6984bea2164a8ffb33224 Author: mattjackson220 <[email protected]> AuthorDate: Fri Nov 13 13:19:25 2020 -0700 fixed federations/all IMS (#5269) * fixed federations/all IMS * updated changelog * missed issue number * updated my changelog to match format on others (cherry picked from commit f6a805651310c2efcba6290ab16761fd50ad81e2) --- CHANGELOG.md | 1 + traffic_ops/traffic_ops_golang/federations/allfederations.go | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a5fc170..5d14fd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -128,6 +128,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Fixed an issue with Traffic Monitor to fix peer polling to work as expected - Fixed #5274 - CDN in a Box's Traffic Vault image failed to build due to Basho's repo responding with 402 Payment Required. The repo has been removed from the image. - #5069 - For LetsEncryptDnsChallengerWatcher in Traffic Router, the cr-config location is configurable instead of only looking at `/opt/traffic_router/db/cr-config.json` +- #5191 - Error from IMS requests to /federations/all ### Changed diff --git a/traffic_ops/traffic_ops_golang/federations/allfederations.go b/traffic_ops/traffic_ops_golang/federations/allfederations.go index cf5539b..20cfc08 100644 --- a/traffic_ops/traffic_ops_golang/federations/allfederations.go +++ b/traffic_ops/traffic_ops_golang/federations/allfederations.go @@ -237,7 +237,15 @@ func tryIfModifiedSinceQuery(header http.Header, tx *sql.Tx, param string, imsQu return runSecond, max } - rows, err := tx.Query(imsQuery, param) + var rows *sql.Rows + var err error + + if param == "" { + rows, err = tx.Query(imsQuery) + } else { + rows, err = tx.Query(imsQuery, param) + } + if err != nil { log.Warnf("Couldn't get the max last updated time: %v", err) return runSecond, max
