mirror of
https://github.com/Icinga/icinga2.git
synced 2025-05-02 21:50:20 +02:00
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")
|
Log(LogNotice, "Comment")
|
||||||
<< "Removed comment '" << comment->GetName() << "' from object '" << comment->GetCheckable()->GetName() << "'.";
|
<< "Removed comment '" << comment->GetName() << "' from object '" << comment->GetCheckable()->GetName() << "'.";
|
||||||
|
|
||||||
|
if (comment->GetPackage() != "_api")
|
||||||
|
return;
|
||||||
|
|
||||||
Array::Ptr errors = new Array();
|
Array::Ptr errors = new Array();
|
||||||
|
|
||||||
if (!ConfigObjectUtility::DeleteObject(comment, false, errors)) {
|
if (!ConfigObjectUtility::DeleteObject(comment, false, errors)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user