Created defer_consent module

This commit is contained in:
Nathan Schneider
2021-12-22 22:22:17 -07:00
parent fa50a59938
commit 44c3e41b81
7 changed files with 65 additions and 8 deletions

View File

@ -23,7 +23,7 @@ function consent:initiate(result)
if self.org:get_member_count() == 0 then
if self.data.result then
self.data.result() end
self.org:wipe_pending_actions(self.id)
self.org:delete_process(self.id)
else
-- otherwise, create poll
for id, member in pairs(self.org.members) do
@ -44,7 +44,6 @@ function consent:callback(member)
if self.data.votes >= self.config.votes_required then
if self.data.result then
self.data.result() end
self.org:wipe_pending_actions(self.id)
self.org:delete_process(self.id)
end
modpol.interactions.org_dashboard(