Don't try to delete Downtime objects that were statically configured

fixes #13275
This commit is contained in:
Gunnar Beutner 2016-11-22 15:13:43 +01:00
parent 78fa197b9f
commit 56e9a23a65
1 changed files with 3 additions and 0 deletions

View 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)) {