From 11393bcfdcd0e2ed3cfe50349a94dbffa3464bd1 Mon Sep 17 00:00:00 2001 From: Timur Kelman Date: Tue, 7 Nov 2023 19:42:30 +0100 Subject: [PATCH] fix a bug introduced in recent commit --- gui/job-details.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gui/job-details.lua b/gui/job-details.lua index 29c2a5fbff..da0d388bde 100644 --- a/gui/job-details.lua +++ b/gui/job-details.lua @@ -257,14 +257,16 @@ local function GetHeader(iobj, items, i, is_active_job) end function JobDetails:initListChoices() - local job_items = self.job.items + local job_items local items = {} local is_active_job = false if self:isManagerOrder() then - if not job_items then + if not self.job.items then self.list:setChoices({}) return end + + job_items = self.job.items else is_active_job = true @@ -274,6 +276,8 @@ function JobDetails:initListChoices() items[idx] = (items[idx] or 0) + 1 end end + + job_items = self.job.job_items end local headers = {}