diff --git a/lib/db_ido/dbevents.cpp b/lib/db_ido/dbevents.cpp index 9da40139b..32fdf04d1 100644 --- a/lib/db_ido/dbevents.cpp +++ b/lib/db_ido/dbevents.cpp @@ -601,8 +601,12 @@ void DbEvents::RemoveDowntimeInternal(std::vector& queries, const Downt Dictionary::Ptr fields3 = new Dictionary(); fields3->Set("was_cancelled", downtime->GetWasCancelled() ? 1 : 0); - fields3->Set("actual_end_time", DbValue::FromTimestamp(time_bag.first)); - fields3->Set("actual_end_time_usec", time_bag.second); + + if (downtime->GetFixed() || (!downtime->GetFixed() && downtime->GetTriggerTime() > 0)) { + fields3->Set("actual_end_time", DbValue::FromTimestamp(time_bag.first)); + fields3->Set("actual_end_time_usec", time_bag.second); + } + fields3->Set("is_in_effect", 0); query3.Fields = fields3;