From 61f7934a3b3b31a4882705f0600285539bbf9b87 Mon Sep 17 00:00:00 2001 From: Deluan Date: Sat, 5 Sep 2026 02:04:51 -0400 Subject: [PATCH] fix(pglite): compare starred as a boolean in annotation filters The starred filter used COALESCE(starred, 0) > 0, which PostgreSQL rejects for a boolean column ('COALESCE types boolean and integer cannot be matched'); the Favourites lists returned 500. --- persistence/sql_annotations.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/persistence/sql_annotations.go b/persistence/sql_annotations.go index bbd67e7d3..10e3ccb79 100644 --- a/persistence/sql_annotations.go +++ b/persistence/sql_annotations.go @@ -95,10 +95,7 @@ func annotationBoolFilter(field string) func(string, any) Sqlizer { if !ok { return nil } - if strings.ToLower(v) == "true" { - return Expr(fmt.Sprintf("COALESCE(%s, 0) > 0", field)) - } - return Expr(fmt.Sprintf("COALESCE(%s, 0) = 0", field)) + return Expr(fmt.Sprintf("COALESCE(%s, false) = %t", field, strings.ToLower(v) == "true")) } }