diff --git a/lib/db_ido/dbevents.cpp b/lib/db_ido/dbevents.cpp index 37b8a1773..65eb6bdf4 100644 --- a/lib/db_ido/dbevents.cpp +++ b/lib/db_ido/dbevents.cpp @@ -441,19 +441,8 @@ void DbEvents::AddDowntimes(const Checkable::Ptr& checkable) { std::set downtimes = checkable->GetDowntimes(); - /* Ensure to delete all downtimes and then insert any or none. - * We must purge obsolete downtimes in the database at all cost. */ - std::vector queries; - DbQuery query1; - query1.Table = "scheduleddowntime"; - query1.Type = DbQueryDelete; - query1.Category = DbCatDowntime; - query1.WhereCriteria = new Dictionary(); - query1.WhereCriteria->Set("object_id", checkable); - queries.push_back(query1); - BOOST_FOREACH(const Downtime::Ptr& downtime, downtimes) { AddDowntimeInternal(queries, downtime, false); }