Fix aggregation of the type and is_service livestatus comment columns

refs #5332
This commit is contained in:
Johannes Meyer 2013-12-16 15:36:38 +01:00
parent 4a6fddadb8
commit 3aa21fb340

View File

@ -119,7 +119,8 @@ Value CommentsTable::EntryTimeAccessor(const Value& row)
Value CommentsTable::TypeAccessor(const Value& row)
{
Service::Ptr svc = Service::GetOwnerByCommentID(row);
Comment::Ptr comment = static_cast<Comment::Ptr>(row);
Service::Ptr svc = Service::GetOwnerByCommentID(comment->GetId());
if (!svc)
return Empty;
@ -129,7 +130,8 @@ Value CommentsTable::TypeAccessor(const Value& row)
Value CommentsTable::IsServiceAccessor(const Value& row)
{
Service::Ptr svc = Service::GetOwnerByCommentID(row);
Comment::Ptr comment = static_cast<Comment::Ptr>(row);
Service::Ptr svc = Service::GetOwnerByCommentID(comment->GetId());
if (!svc)
return Empty;