Don't try to remove comments that were statically configured

fixes #5094
This commit is contained in:
Gunnar Beutner 2017-03-27 10:45:07 +02:00
parent 2d6434e96a
commit a73c1580ca
1 changed files with 3 additions and 0 deletions

View File

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