calling self:call_module instead of self.org:call_module, this should fix process deletion issues
This commit is contained in:
		| @@ -42,7 +42,7 @@ function add_child_org_consent:initiate(result) | ||||
|                self.initiator, | ||||
|                "Proposed child org: " .. input) | ||||
|          -- initiate consent process | ||||
|          self.org:call_module( | ||||
|          self:call_module( | ||||
|             "consent", | ||||
|             self.initiator,  | ||||
|             { | ||||
|   | ||||
| @@ -128,7 +128,7 @@ end | ||||
| --- propose_change | ||||
| -- @field type "add" or "remove" | ||||
| function change_modules:propose_change(type, mod_text) | ||||
|    self.org:call_module( | ||||
|    self:call_module( | ||||
|       "consent",self.initiator, | ||||
|       { | ||||
|          prompt = "Do you consent to "..type.. | ||||
|   | ||||
| @@ -75,7 +75,7 @@ function change_modules:initiate(result) | ||||
|             self.data.summary = "\nRemove: ".. | ||||
|                table.concat(self.data.remove_modules,", ") | ||||
|          end | ||||
|          self.org:call_module( | ||||
|          self:call_module( | ||||
|             "consent", | ||||
|             self.initiator, | ||||
|             { | ||||
|   | ||||
| @@ -28,7 +28,7 @@ function create_token:initiate(result) | ||||
|       "Token name (alpha-numeric, no spaces):", | ||||
|       function(input) | ||||
|          self.config.token_name = input | ||||
|          self.org:call_module( | ||||
|          self:call_module( | ||||
|             "tokenomics", | ||||
|             self.initiator, | ||||
|             { | ||||
|   | ||||
| @@ -24,7 +24,7 @@ function join_org_consent:initiate(result) | ||||
|       self.org:delete_process(self.id) | ||||
|    else | ||||
|       self.data.result = result | ||||
|       self.org:call_module( | ||||
|       self:call_module( | ||||
|          "consent",  | ||||
|          self.initiator,  | ||||
|         { | ||||
|   | ||||
| @@ -38,7 +38,7 @@ function remove_child_consent:initiate(result) | ||||
|          children, | ||||
|          function(input) | ||||
|             self.data.child_to_remove = modpol.orgs.get_org(input) | ||||
|             self.org:call_module( | ||||
|             self:call_module( | ||||
|                "consent", | ||||
|                self.initiator, | ||||
|                { | ||||
|   | ||||
| @@ -32,7 +32,7 @@ function remove_member_consent:initiate(result) | ||||
|          self.org.members, | ||||
|          function(input) | ||||
|             self.data.member_to_remove = input | ||||
|             self.org:call_module( | ||||
|             self:call_module( | ||||
|                "consent", | ||||
|                self.initiator, | ||||
|                { | ||||
|   | ||||
| @@ -24,7 +24,7 @@ function remove_org_consent:initiate(result) | ||||
|       self.org:delete_process(self.id) | ||||
|    else | ||||
|       self.data.result = result | ||||
|       self.org:call_module( | ||||
|       self:call_module( | ||||
|         "consent",  | ||||
|         self.initiator,  | ||||
|         { | ||||
|   | ||||
| @@ -73,7 +73,7 @@ function remove_process:initiate(result) | ||||
|                      if result then result() end | ||||
|                      self.org:delete_process(self.id) | ||||
|                   else | ||||
|                      self.org:call_module( | ||||
|                      self:call_module( | ||||
|                         "consent", | ||||
|                         self.initiator, | ||||
|                         { | ||||
|   | ||||
| @@ -45,7 +45,7 @@ function rename_org_consent:initiate(result) | ||||
|                "Proposed to change name of org " .. | ||||
|                self.org.name .. " to " .. input) | ||||
|          -- initiate consent process | ||||
|          self.org:call_module( | ||||
|          self:call_module( | ||||
|             "consent", | ||||
|             self.initiator,  | ||||
|             { | ||||
|   | ||||
| @@ -47,7 +47,7 @@ function tokenomics:initiate(result) | ||||
|       self.org:delete_process(self.id) | ||||
|    else | ||||
|       if self.config.consent then | ||||
|          self.org:call_module( | ||||
|          self:call_module( | ||||
|             "consent", | ||||
|             self.initiator, | ||||
|             { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user