IDO: Fix where condition for downtime history updates

fixes #5080
This commit is contained in:
Michael Friedrich 2017-03-20 13:19:37 +01:00 committed by Gunnar Beutner
parent 14f3ee8024
commit b3354266f3
1 changed files with 1 additions and 0 deletions

View File

@ -689,6 +689,7 @@ void DbEvents::TriggerDowntime(const Downtime::Ptr& downtime)
query3.Fields = fields3; query3.Fields = fields3;
query3.WhereCriteria = new Dictionary(); query3.WhereCriteria = new Dictionary();
query3.WhereCriteria->Set("object_id", checkable);
query3.WhereCriteria->Set("internal_downtime_id", downtime->GetLegacyId()); query3.WhereCriteria->Set("internal_downtime_id", downtime->GetLegacyId());
query3.WhereCriteria->Set("entry_time", DbValue::FromTimestamp(downtime->GetEntryTime())); query3.WhereCriteria->Set("entry_time", DbValue::FromTimestamp(downtime->GetEntryTime()));
query3.WhereCriteria->Set("scheduled_start_time", DbValue::FromTimestamp(downtime->GetStartTime())); query3.WhereCriteria->Set("scheduled_start_time", DbValue::FromTimestamp(downtime->GetStartTime()));