Skip to content

Commit

Permalink
fix downtime state bbdo3
Browse files Browse the repository at this point in the history
  • Loading branch information
tanguyvda committed May 12, 2022
1 parent 9e1633a commit 14be0c9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/centreon-stream-connectors-lib/sc_event.lua
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,11 @@ end
--- is_valid_event_downtime_state: check if the event is in an accepted downtime state
-- @return true|false (boolean)
function ScEvent:is_valid_event_downtime_state()
-- patch compat bbdo 3 => bbdo 2
if (not self.event.scheduled_downtime_depth and self.event.downtime_depth) then
self.event.scheduled_downtime_depth = self.event.downtime_depth
end

if not self.sc_common:compare_numbers(self.params.in_downtime, self.event.scheduled_downtime_depth, ">=") then
self.sc_logger:warning("[sc_event:is_valid_event_downtime_state]: event is not in an valid downtime state. Event downtime state must be above or equal to " .. tostring(self.params.in_downtime)
.. ". Current downtime state: " .. tostring(self.sc_common:boolean_to_number(self.event.scheduled_downtime_depth)))
Expand Down

0 comments on commit 14be0c9

Please sign in to comment.