From d2649242bff21ac4c790710b5aaa0d4f9a2a04e0 Mon Sep 17 00:00:00 2001 From: Srijeet Chatterjee Date: Tue, 28 Jun 2022 13:59:53 -0600 Subject: [PATCH] Fix Internal Server Error in --- CHANGELOG.md | 1 + traffic_ops/traffic_ops_golang/dbhelpers/db_helpers.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 862c0cb548..ecf23e817b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -59,6 +59,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - [#6712](https://github.com/apache/trafficcontrol/issues/6712) - Fixed error when loading the Traffic Vault schema from `create_tables.sql` more than once. - [#6834](https://github.com/apache/trafficcontrol/issues/6834) - In API 4.0, fixed `GET` for `/servers` to display all profiles irrespective of the index position. Also, replaced query param `profileId` with `profileName`. - [#6299](https://github.com/apache/trafficcontrol/issues/6299) User representations don't match +- [#6896](https://github.com/apache/trafficcontrol/issues/6896) Fixed the `POST api/cachegroups/id/queue_updates` endpoint so that it doesn't give an internal server error anymore. - [#6776](https://github.com/apache/trafficcontrol/issues/6776) User properties only required sometimes ### Removed diff --git a/traffic_ops/traffic_ops_golang/dbhelpers/db_helpers.go b/traffic_ops/traffic_ops_golang/dbhelpers/db_helpers.go index d4c34ef63b..3e0b508390 100644 --- a/traffic_ops/traffic_ops_golang/dbhelpers/db_helpers.go +++ b/traffic_ops/traffic_ops_golang/dbhelpers/db_helpers.go @@ -1921,7 +1921,7 @@ UPDATE public.server SET config_update_time = config_apply_time WHERE server.cachegroup = $1 AND server.cdn_id = $2 -RETURNING (SELECT s.host_name FROM "server" s WHERE s.id = server_id);` +RETURNING server.host_name;` rows, err := tx.Query(q, cgID, cdnID) if err != nil { return nil, fmt.Errorf("querying queue updates: %w", err)