Skip to content

Commit 7a14a68

Browse files
tanguyvdasdepassio
authored andcommitted
fix local variable
1 parent b41cad6 commit 7a14a68

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -525,9 +525,9 @@ function EventQueue:send_data(payload, queue_metadata)
525525
"x-canopsis-authkey: " .. tostring(self.sc_params.params.canopsis_authkey)
526526
}
527527

528-
local downtimes_comment_data = {}
528+
self.downtimes_comment_data = {}
529529
for _, downtime_info in ipairs(payload) do
530-
table.insert(downtimes_comment_data, downtime_info.comment)
530+
table.insert(self.downtimes_comment_data, downtime_info.comment)
531531
-- remove comment from downtime creation payload. While it the paylaod is accepted with this data, it is not computed so it adds weight to the payload for nothing
532532
downtime_info.comment = nil
533533
end
@@ -615,7 +615,7 @@ function EventQueue:send_data(payload, queue_metadata)
615615
event_route = self.sc_params.params.canopsis_downtime_comment_route
616616
}
617617

618-
for _, downtime_comment in ipairs(downtimes_comment_data) do
618+
for _, downtime_comment in ipairs(self.downtimes_comment_data) do
619619
self:postCanopsisAPI(metadata_comment, self.sc_params.params.canopsis_downtime_comment_route, downtime_comment)
620620
end
621621
end

0 commit comments

Comments
 (0)