From 3aa21fb340e004ec3d64609415d9494d8cee9881 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 16 Dec 2013 15:36:38 +0100 Subject: [PATCH] Fix aggregation of the type and is_service livestatus comment columns refs #5332 --- components/livestatus/commentstable.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/livestatus/commentstable.cpp b/components/livestatus/commentstable.cpp index c77ea587d..3b36805a9 100644 --- a/components/livestatus/commentstable.cpp +++ b/components/livestatus/commentstable.cpp @@ -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(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(row); + Service::Ptr svc = Service::GetOwnerByCommentID(comment->GetId()); if (!svc) return Empty; -- 2.40.0