You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2020/04/04 00:28:57 UTC
[GitHub] [trafficcontrol] rawlinp commented on a change in pull request
#4598: Allow negative limit to receive all records back
rawlinp commented on a change in pull request #4598: Allow negative limit to receive all records back
URL: https://github.com/apache/trafficcontrol/pull/4598#discussion_r403395457
##########
File path: traffic_ops/traffic_ops_golang/dbhelpers/db_helpers.go
##########
@@ -157,12 +157,16 @@ func BuildWhereAndOrderByAndPagination(parameters map[string]string, queryParams
if limit, exists := parameters["limit"]; exists {
// try to convert to int, if it fails the limit parameter is invalid, so return an error
limitInt, err := strconv.Atoi(limit)
- if err != nil || limitInt < 1 {
- errs = append(errs, errors.New("limit parameter must be a positive integer"))
+ if err != nil || limitInt < -1 {
+ errs = append(errs, errors.New("limit parameter must be bigger then -1"))
Review comment:
`bigger then` -> `bigger than` (applies to the rest of the PR as well)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services