From 4f1ecabcec841955cfe35fb1951ad47a2ab1bdd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89mile=20R=C3=A9?= Date: Mon, 4 May 2026 14:58:47 +0400 Subject: [PATCH] Defensive / migration guard on uncategorised cookies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Émile Ré --- pkg/cookiebanner/service.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/cookiebanner/service.go b/pkg/cookiebanner/service.go index 9ed3b0d60..90733f82b 100644 --- a/pkg/cookiebanner/service.go +++ b/pkg/cookiebanner/service.go @@ -1928,7 +1928,12 @@ func buildBannerConfig( } } - categories := snapshot.Categories + categories := make([]coredata.CookieBannerVersionSnapshotCategory, 0, len(snapshot.Categories)) + for _, c := range snapshot.Categories { + if c.Kind != coredata.CookieCategoryKindUncategorised { + categories = append(categories, c) + } + } texts := make(map[string]string) if t, ok := translations[resolvedLang]; ok {