Skip to content

Commit b41cad6

Browse files
tanguyvdasdepassio
authored andcommitted
forgot the sg part
1 parent ffcfc55 commit b41cad6

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

centreon-certified/canopsis/canopsis2x-events-apiv2.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,10 @@ end
261261
function EventQueue:list_servicegroups()
262262
local servicegroups = {}
263263

264-
for _, sg in pairs(self.sc_event.event.cache.servicegroups) do
265-
table.insert(servicegroups, sg.group_name)
264+
if type(self.sc_event.event.cache.servicegroups) == "table" then
265+
for _, sg in pairs(self.sc_event.event.cache.servicegroups) do
266+
table.insert(servicegroups, sg.group_name)
267+
end
266268
end
267269

268270
if self.sc_params.params.canopsis_sort_list_servicegroups == 1 then

0 commit comments

Comments
 (0)