fix: SQL boolean and nullable value comparison
This commit is contained in:
parent
478af0fad0
commit
1c8098fe73
1 changed files with 2 additions and 1 deletions
|
|
@ -74,7 +74,8 @@ function customerHistory (customerId, thresholdDays) {
|
|||
FROM cash_out_txs txOut
|
||||
WHERE txOut.customer_id = $1
|
||||
AND txOut.created > now() - interval $2
|
||||
AND (timedout = true OR error_code != 'operatorCancel')
|
||||
AND timedout IS false
|
||||
AND error_code IS DISTINCT FROM 'operatorCancel'
|
||||
ORDER BY created;`
|
||||
|
||||
const days = _.isNil(thresholdDays) ? 0 : thresholdDays
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue