You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by da...@apache.org on 2018/07/04 02:39:29 UTC
[trafficcontrol] 04/15: fix cachegroup where clause info to match
select statement
This is an automated email from the ASF dual-hosted git repository.
dangogh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git
commit 4d980d931cd308beb85b707afcc3cd097bdd9ffe
Author: Dylan Volz <Dy...@comcast.com>
AuthorDate: Tue Jun 26 19:58:51 2018 -0600
fix cachegroup where clause info to match select statement
---
traffic_ops/traffic_ops_golang/cachegroup/cachegroups.go | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/traffic_ops/traffic_ops_golang/cachegroup/cachegroups.go b/traffic_ops/traffic_ops_golang/cachegroup/cachegroups.go
index 03da6d2..784e15f 100644
--- a/traffic_ops/traffic_ops_golang/cachegroup/cachegroups.go
+++ b/traffic_ops/traffic_ops_golang/cachegroup/cachegroups.go
@@ -289,10 +289,10 @@ func (cg *TOCacheGroup) Read(parameters map[string]string) ([]interface{}, []err
// Query Parameters to Database Query column mappings
// see the fields mapped in the SQL query
queryParamsToQueryCols := map[string]dbhelpers.WhereColumnInfo{
- "id": dbhelpers.WhereColumnInfo{"cg.id", api.IsInt},
- "name": dbhelpers.WhereColumnInfo{"cg.name", nil},
+ "id": dbhelpers.WhereColumnInfo{"cachegroup.id", api.IsInt},
+ "name": dbhelpers.WhereColumnInfo{"cachegroup.name", nil},
"shortName": dbhelpers.WhereColumnInfo{"short_name", nil},
- "type": dbhelpers.WhereColumnInfo{"cg.type", nil},
+ "type": dbhelpers.WhereColumnInfo{"cachegroup.type", nil},
}
where, orderBy, queryValues, errs := dbhelpers.BuildWhereAndOrderBy(parameters, queryParamsToQueryCols)
if len(errs) > 0 {