Files
COMERCIAL-GTI/tests
Gustavo d6fdfc6e2d Fix invalid prioridade filter silently matching P4 instead of nothing
buildLeadFilter used Number(filtro.prioridade) || 4, so an explicit
prioridade=0 or any non-numeric value (both falsy after Number()) matched
P4 leads instead of the requested (invalid) priority. Not reachable via
the UI (its dropdown only offers 1-4) but reachable through a direct API
call. Drops the fallback: an invalid value becomes NaN, which node:sqlite
accepts as a bound parameter and never compares equal to anything, so it
now correctly matches zero rows instead of silently redirecting to P4.

Found via a full-project audit.
2026-07-31 22:30:45 -03:00
..