fix(tenant-symbols): isActive Filter auf NULL tolerant – zeigt Symbole auch ohne isActive-Wert
Some checks failed
Build and Push Docker Image / build-and-push (push) Has been cancelled

This commit is contained in:
Pepe Ziberi
2026-05-21 15:36:13 +02:00
parent a91a4c4689
commit 6588959b50

View File

@@ -62,7 +62,7 @@ export async function GET(req: NextRequest) {
`SELECT ts.*, tc.id as "catId", tc.name as "catName", tc."sortOrder" as "catSort"
FROM tenant_symbols ts
LEFT JOIN tenant_categories tc ON ts."categoryId" = tc.id
WHERE ts."tenantId" = $1 AND ts."isActive" = true
WHERE ts."tenantId" = $1 AND (ts."isActive" IS NULL OR ts."isActive" = true)
ORDER BY COALESCE(tc."sortOrder", 9999) ASC, COALESCE(ts."sortOrder", 9999) ASC, COALESCE(ts.name, ts."customName", 'Unbenannt') ASC`,
tenantId
)