Added failsafes to interactions against 'deleted' processes

This commit is contained in:
Nathan Schneider
2022-01-06 09:58:15 -07:00
parent bdf4d86593
commit 65bb1aa532
2 changed files with 13 additions and 9 deletions

View File

@ -161,10 +161,12 @@ function modpol.interactions.org_dashboard(user, org_string)
local num_pending = 0
if org.pending[user] then
for k,v in pairs(org.pending[user]) do
local pending_string = org.processes[k].name
.." ["..k.."]"
table.insert(pending, pending_string)
num_pending = num_pending + 1
if org.processes[k] ~= "deleted" then
local pending_string = org.processes[k].name
.." ["..k.."]"
table.insert(pending, pending_string)
num_pending = num_pending + 1
end
end
end
table.sort(pending)