Fixes on process logic

This commit is contained in:
Nathan Schneider
2022-08-23 16:55:57 -06:00
parent 838a017f14
commit 9d759530e6
2 changed files with 9 additions and 11 deletions
modpol_core

@ -109,8 +109,8 @@ function change_policy:approve_change(module_slug, policy, input)
function() function()
modpol.interactions.message( modpol.interactions.message(
self.initiator, self.initiator,
"Updating " .. policy .. " policy on module " .. "In ".. self.org.name .. " updating " .. policy ..
module_slug .. " with: " .. input) " policy on module " .. module_slug .. " with: " .. input)
self.org.policies[module_slug][policy] = input self.org.policies[module_slug][policy] = input
modpol.interactions.org_dashboard( modpol.interactions.org_dashboard(
self.initiator, self.org.id) self.initiator, self.org.id)

@ -15,10 +15,8 @@ function modpol.orgs:call_module(module_slug, initiator, config, result, parent_
and result() then and result() then
result() result()
return return
end elseif not modpol.modules[module_slug] then
-- if module doesn't exist, abort -- if module doesn't exist, abort
if not modpol.modules[module_slug] then
modpol.ocutil.log('Error in ' .. self.name .. ':call_module -> module "' .. tostring(module_slug) .. '" not found') modpol.ocutil.log('Error in ' .. self.name .. ':call_module -> module "' .. tostring(module_slug) .. '" not found')
return return
end end