You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2019/05/28 19:24:11 UTC

[GitHub] [incubator-openwhisk-apigateway] rabbah commented on a change in pull request #343: Guard against missing query parameters.

rabbah commented on a change in pull request #343: Guard against missing query parameters.
URL: https://github.com/apache/incubator-openwhisk-apigateway/pull/343#discussion_r288264134
 
 

 ##########
 File path: scripts/lua/management/lib/tenants.lua
 ##########
 @@ -114,7 +114,7 @@ function _M.getTenantAPIs(dataStore, id, queryParams)
       end
     end
   end
-  if ((queryParams['skip']  == nil and queryParams['limit'] == nil) or table.getn(apiList) == 0) then
+  if (((queryParams['skip'] == nil or queryParams['skip'] == 'undefined') and (queryParams['limit'] == nil or queryParams['limit'] == 'undefined')) or table.getn(apiList) == 0) then
 
 Review comment:
   alternatively, can check if `tonumber` returns nil here which should cover both parts of the `or`.

----------------------------------------------------------------
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