simplified request params check
This commit is contained in:
1 parent
56ab80d08e
commit
0f41e15845
1 file changed
+2
-6
@@ -108,12 +108,8 @@ function modpol.orgs:make_request(request)
|
||||
return false
|
||||
end
|
||||
|
||||
-- num_params should equal zero at the end if request.params matches the num of params for that type
|
||||
for k, v in ipairs(request.params) do
|
||||
num_params = num_params - 1
|
||||
end
|
||||
|
||||
if num_params ~= 0 then
|
||||
-- request.params should match the num of params for that type
|
||||
if #request.params ~= num_params then
|
||||
modpol.ocutil.log('Error in ' .. self.name .. ':make_request -> request has invalid number of parameters')
|
||||
return false
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user