Skip to content

Commit

Permalink
Removed some commented code as per PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
jagan-parthiban committed Aug 24, 2023
1 parent 960a93f commit 250c587
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions traffic_ops/traffic_ops_golang/parameter/parameters.go
Original file line number Diff line number Diff line change
Expand Up @@ -544,15 +544,6 @@ func DeleteParameter(w http.ResponseWriter, r *http.Request) {
return
}

//assignedProfile := 0
//if err := inf.Tx.Get(&assignedProfile, "SELECT count(profile) FROM profile_parameter pp WHERE pp.parameter=$1", id); err != nil {
// api.HandleErr(w, r, tx, http.StatusInternalServerError, nil, fmt.Errorf("parameter delete error, could not count assigned profiles: %w", err))
// return
//} else if assignedProfile != 0 {
// api.HandleErr(w, r, tx, http.StatusBadRequest, fmt.Errorf("can not delete a parameter with %d assigned profile", assignedProfile), nil)
// return
//}

res, err := tx.Exec("DELETE FROM parameter AS p WHERE p.id=$1", id)
if err != nil {
api.HandleErr(w, r, tx, http.StatusInternalServerError, nil, err)
Expand Down

0 comments on commit 250c587

Please sign in to comment.