Browse Source

Small fix on policy_change variables

Nathan Schneider 1 year ago
parent
commit
ec0e4aa9c1
1 changed files with 5 additions and 5 deletions
  1. 5 5
      modpol_core/modules/change_policy.lua

+ 5 - 5
modpol_core/modules/change_policy.lua

@@ -64,15 +64,15 @@ function change_policy:initiate(result)
             self.org:delete_process(self.id)
             return
          end
-         local readable_value =
-            tostring(modpol.modules[mod_choice][policy_choice])
-         if readable_value == "nil" then
-            readable_value = "none"
-         end                     
          modpol.interactions.dropdown_query(
             self.initiator, "Choose a policy to change:",
             policy_list,
             function(policy_choice)
+               local readable_value =
+                  tostring(modpol.modules[mod_choice][policy_choice])
+               if readable_value == "nil" then
+                  readable_value = "none"
+               end                     
                modpol.interactions.text_query(
                   self.initiator,
                   "Current " .. policy_choice .. " value: "