From 4266f9cf42451fec65c409ace32f89d08d71742c Mon Sep 17 00:00:00 2001 From: Patrik Segedy Date: Mon, 2 Sep 2024 11:07:32 +0200 Subject: [PATCH] RHINENG-12299: fix index out of range error --- base/database/baseline.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/database/baseline.go b/base/database/baseline.go index b8793f190..2a11ba470 100644 --- a/base/database/baseline.go +++ b/base/database/baseline.go @@ -28,7 +28,7 @@ func GetBaselineConfig(system *models.SystemPlatform) *BaselineConfig { } var config BaselineConfig - if len(jsonb[0]) == 0 { + if len(jsonb) > 0 && len(jsonb[0]) == 0 { utils.LogDebug("baseline_id", system.BaselineID, "Empty baseline config found") return nil }