You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by mi...@apache.org on 2018/05/17 02:25:51 UTC

[incubator-trafficcontrol] 05/17: fix select to be a get for count of assigned users

This is an automated email from the ASF dual-hosted git repository.

mitchell852 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git

commit 4cb5517a4f57d664880a79d3642f6f21da8fb29e
Author: Dylan Volz <Dy...@comcast.com>
AuthorDate: Wed Apr 11 16:12:15 2018 -0600

    fix select to be a get for count of assigned users
---
 traffic_ops/traffic_ops_golang/role/roles.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/traffic_ops/traffic_ops_golang/role/roles.go b/traffic_ops/traffic_ops_golang/role/roles.go
index 4466711..5d2f5ea 100644
--- a/traffic_ops/traffic_ops_golang/role/roles.go
+++ b/traffic_ops/traffic_ops_golang/role/roles.go
@@ -270,7 +270,7 @@ func (role *TORole) Delete(db *sqlx.DB, user auth.CurrentUser) (error, tc.ApiErr
 		return tc.DBError, tc.SystemError
 	}
 	assignedUsers := 0
-	err = tx.Select(&assignedUsers, "SELECT COUNT(id) FROM tm_user WHERE role=$1", role.ID)
+	err = tx.Get(&assignedUsers, "SELECT COUNT(id) FROM tm_user WHERE role=$1", role.ID)
 	if err != nil {
 		log.Errorf("received error: %++v from assigned users check", err)
 		return tc.DBError, tc.SystemError

-- 
To stop receiving notification emails like this one, please contact
mitchell852@apache.org.