mirror of https://github.com/Icinga/icinga2.git
Don't try to remove comments that were statically configured
fixes #5094
This commit is contained in:
parent
2d6434e96a
commit
a73c1580ca
|
@ -214,6 +214,9 @@ void Comment::RemoveComment(const String& id, const MessageOrigin::Ptr& origin)
|
|||
Log(LogNotice, "Comment")
|
||||
<< "Removed comment '" << comment->GetName() << "' from object '" << comment->GetCheckable()->GetName() << "'.";
|
||||
|
||||
if (comment->GetPackage() != "_api")
|
||||
return;
|
||||
|
||||
Array::Ptr errors = new Array();
|
||||
|
||||
if (!ConfigObjectUtility::DeleteObject(comment, false, errors)) {
|
||||
|
|
Loading…
Reference in New Issue