From c96069358775b17d98e91c3a5384e9db990041c8 Mon Sep 17 00:00:00 2001 From: Sandy Li <47486464+iamsli@users.noreply.github.com> Date: Mon, 25 Nov 2024 08:47:47 -0500 Subject: [PATCH] LeakDetection is an instance in ThermalSubsystem (#383) --- redfish/thermalsubsystem.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/redfish/thermalsubsystem.go b/redfish/thermalsubsystem.go index dcf2a94e..2b5cf957 100644 --- a/redfish/thermalsubsystem.go +++ b/redfish/thermalsubsystem.go @@ -94,8 +94,12 @@ func (thermalsubsystem *ThermalSubsystem) Heaters() ([]*Heater, error) { } // LeakDetection gets the leak detection system within this chassis. -func (thermalsubsystem *ThermalSubsystem) LeakDetection() ([]*LeakDetection, error) { - return ListReferencedLeakDetections(thermalsubsystem.GetClient(), thermalsubsystem.leakDetection) +func (thermalsubsystem *ThermalSubsystem) LeakDetection() (*LeakDetection, error) { + if thermalsubsystem.leakDetection == "" { + return nil, nil + } + + return GetLeakDetection(thermalsubsystem.GetClient(), thermalsubsystem.leakDetection) } // Pumps gets the pumps for this equipment.