Various bugfixes on defer and processes
This commit is contained in:
@ -8,13 +8,18 @@
|
||||
-- @param config Config for module
|
||||
-- @param result
|
||||
function modpol.orgs:call_module(module_slug, initiator, config, result, parent_id)
|
||||
if not module_slug then -- if slug is false then simply run result
|
||||
|
||||
-- first, if no slug, just run result
|
||||
-- may not be necessary if we use false as default approval_module
|
||||
if not module_slug
|
||||
and result() then
|
||||
result()
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
-- if module doesn't exist, abort
|
||||
if not modpol.modules[module_slug] then
|
||||
modpol.ocutil.log('Error in ' .. self.name .. ':call_module -> module "' .. module_slug .. '" not found')
|
||||
modpol.ocutil.log('Error in ' .. self.name .. ':call_module -> module "' .. tostring(module_slug) .. '" not found')
|
||||
return
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user