From 664488d805244e2fa6dac9966eb5cc8b0b6488cc Mon Sep 17 00:00:00 2001 From: Jeremy Lenz Date: Wed, 28 Feb 2024 12:09:22 -0500 Subject: [PATCH] Fixes #37178 - use safe navigation for operatingsystem (#10897) --- 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