mirror of
https://github.com/R0m1k3/CollectFlow.git
synced 2026-10-12 01:36:43 +02:00
fix: robustify suspended product filter using ::text cast
The previous ::boolean cast caused query failure when suspendu column is not a native boolean type. Casting to ::text first handles all column types (char, varchar, int, boolean). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
a60e21eb04
commit
de46e056d2
1 file changed
+2
-2
@@ -151,8 +151,8 @@ export async function pgGetArticlesByFournisseur(codefou: string): Promise<PgArt
|
||||
) last_fournisseur ON true
|
||||
WHERE af.code = ${codefou}
|
||||
AND a.codein IS NOT NULL
|
||||
AND NOT COALESCE(af.suspendu::boolean, false)
|
||||
AND NOT COALESCE(a.suspendu::boolean, false)
|
||||
AND (af.suspendu IS NULL OR af.suspendu::text NOT IN ('1', 'true', 't', 'yes', 'y', 'on'))
|
||||
AND (a.suspendu IS NULL OR a.suspendu::text NOT IN ('1', 'true', 't', 'yes', 'y', 'on'))
|
||||
ORDER BY a.no_id, af.no_id
|
||||
`);
|
||||
|
||||
|
||||
Reference in new issue
Block a user