Browse Source

Revert on CLI interactions pending process list

Nathan Schneider 2 years ago
parent
commit
0c13e6b084
1 changed files with 8 additions and 2 deletions
  1. 8 2
      modpol_core/interactions/interactions.lua

+ 8 - 2
modpol_core/interactions/interactions.lua

@@ -123,7 +123,7 @@ function modpol.interactions.dashboard(user)
       print("Orgs and users reset")
       modpol.interactions.dashboard(user)
 
-   elseif sel == "Q" or "q" then
+   elseif sel == "Q" or sel == "q" then
       return
 
    else
@@ -169,7 +169,13 @@ function modpol.interactions.org_dashboard(user, org_string)
    table.sort(modules)
 
    -- list pending
-   local process_msg = modpol.util.lazy_table_length(org.processes, "deleted") .. " total processes"
+   local processes = {}
+   for i,v in ipairs(org.processes) do
+      if v ~= "deleted" then
+         processes[i] = org.processes[v]
+      end
+   end
+   local process_msg = #processes .. " total processes"
    if org.pending[user] then
       process_msg = process_msg .. " (" ..
          modpol.util.num_pairs(org.pending[user]) .. " pending)"