From: Gunnar Beutner Date: Tue, 22 Nov 2016 14:13:43 +0000 (+0100) Subject: Don't try to delete Downtime objects that were statically configured X-Git-Tag: v2.6.0~34 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=56e9a23a6570557f2b96469015525d3c9ff197ea;p=icinga2 Don't try to delete Downtime objects that were statically configured fixes #13275 --- diff --git a/lib/icinga/downtime.cpp b/lib/icinga/downtime.cpp index 84cc5b9ab..796d24799 100644 --- a/lib/icinga/downtime.cpp +++ b/lib/icinga/downtime.cpp @@ -310,6 +310,9 @@ void Downtime::RemoveDowntime(const String& id, bool cancelled, bool expired, co Log(LogNotice, "Downtime") << "Removed downtime '" << downtime->GetName() << "' from object '" << downtime->GetCheckable()->GetName() << "'."; + if (downtime->GetPackage() != "_api") + return; + Array::Ptr errors = new Array(); if (!ConfigObjectUtility::DeleteObject(downtime, false, errors)) {