]> granicus.if.org Git - icinga2/commitdiff
Don't try to delete Downtime objects that were statically configured
authorGunnar Beutner <gunnar.beutner@icinga.com>
Tue, 22 Nov 2016 14:13:43 +0000 (15:13 +0100)
committerGunnar Beutner <gunnar.beutner@icinga.com>
Tue, 22 Nov 2016 14:13:43 +0000 (15:13 +0100)
fixes #13275

lib/icinga/downtime.cpp

index 84cc5b9ab0d0c9e545e0b7a1c4899c90031f6279..796d2479968d5ba842c869335976941f947d7a4a 100644 (file)
@@ -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)) {