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 8de5f03058a85fa9b4f7a9199987ce2131ded45c Author: Dan Kirkwood <dang...@apache.org> AuthorDate: Thu Feb 22 11:43:01 2018 -0700 fix status update query --- traffic_ops/traffic_ops_golang/deliveryservice/request/requests.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/traffic_ops/traffic_ops_golang/deliveryservice/request/requests.go b/traffic_ops/traffic_ops_golang/deliveryservice/request/requests.go index aff4678..8cbbafc 100644 --- a/traffic_ops/traffic_ops_golang/deliveryservice/request/requests.go +++ b/traffic_ops/traffic_ops_golang/deliveryservice/request/requests.go @@ -538,7 +538,7 @@ func (req *deliveryServiceRequestAssignment) Update(db *sqlx.DB, user auth.Curre if req.AssigneeID != nil { v = strconv.Itoa(*req.AssigneeID) } - query := fmt.Sprintf(`UPDATE deliveryservice_request SET assignee_id = %s WHERE id=%d`, v, req.ID) + query := `UPDATE deliveryservice_request SET assignee_id = ` + v + ` WHERE id=` + strconv.Itoa(*req.ID) _, err = tx.Exec(query) if err != nil { if pqErr, ok := err.(*pq.Error); ok { @@ -632,7 +632,7 @@ func (req *deliveryServiceRequestStatus) Update(db *sqlx.DB, user auth.CurrentUs } // LastEditedBy field should not change with status update - query := fmt.Sprintf(`UPDATE deliveryservice_request SET status = '%v' WHERE id=%d`, req.Status, req.ID) + query := `UPDATE deliveryservice_request SET status = '` + string(*req.Status) + `' WHERE id=` + strconv.Itoa(*req.ID) _, err = tx.Exec(query) if err != nil { if pqErr, ok := err.(*pq.Error); ok { -- To stop receiving notification emails like this one, please contact mitchell...@apache.org.