From dd407e4477de13e82ad86521f977996c501acc75 Mon Sep 17 00:00:00 2001 From: Dejan Bosanac Date: Wed, 29 Nov 2023 09:34:09 +0100 Subject: [PATCH] fix: multiple sboms for a root package --- pkg/assembler/backends/ent/backend/search.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/assembler/backends/ent/backend/search.go b/pkg/assembler/backends/ent/backend/search.go index 51033bbeff..3d514f072b 100644 --- a/pkg/assembler/backends/ent/backend/search.go +++ b/pkg/assembler/backends/ent/backend/search.go @@ -484,7 +484,8 @@ func (b *EntBackend) FindDependentProduct(ctx context.Context, purl string, offs }) }) }). - Only(ctx) + Order(billofmaterials.ByID(), ent.Desc()). + First(ctx) if err != nil { return nil, err }