From b755f5980fc277f1a59cc14aa295d2cb7b9c5f6f Mon Sep 17 00:00:00 2001 From: Jeremy Lenz Date: Tue, 20 Feb 2024 10:03:58 -0500 Subject: [PATCH] Fixes #37178 - use safe navigation for operatingsystem --- app/views/katello/api/v2/hosts/base.json.rabl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/katello/api/v2/hosts/base.json.rabl b/app/views/katello/api/v2/hosts/base.json.rabl index f337ab2a016..1469b89a69f 100644 --- a/app/views/katello/api/v2/hosts/base.json.rabl +++ b/app/views/katello/api/v2/hosts/base.json.rabl @@ -6,11 +6,11 @@ object @resource attributes :id, :name, :description node :operatingsystem_family do |resource| - resource.operatingsystem.family + resource.operatingsystem&.family end node :operatingsystem_major do |resource| - resource.operatingsystem.major + resource.operatingsystem&.major end if @facet