handle partner_serial_id being NULL
This commit is contained in:
parent
1cdd999c96
commit
07b4b1aa3f
@ -803,7 +803,7 @@ TEH_PG_get_reserve_history (void *cls,
|
||||
" ON (am.purse_pub = pm.purse_pub AND"
|
||||
" am.reserve_pub = pm.reserve_pub)"
|
||||
" WHERE pm.reserve_pub=$1"
|
||||
" AND pm.partner_serial_id=0" /* must be local! */
|
||||
" AND COALESCE(pm.partner_serial_id,0)=0" /* must be local! */
|
||||
" AND NOT pdes.refunded;");
|
||||
PREPARE (pg,
|
||||
"history_by_reserve",
|
||||
@ -1097,7 +1097,7 @@ TEH_PG_get_reserve_status (void *cls,
|
||||
" am.reserve_pub = pm.reserve_pub)"
|
||||
" WHERE pm.reserve_pub=$1"
|
||||
" AND pm.merge_timestamp >= $2"
|
||||
" AND pm.partner_serial_id=0" /* must be local! */
|
||||
" AND COALESCE(pm.partner_serial_id,0)=0" /* must be local! */
|
||||
" AND NOT pdes.refunded;");
|
||||
PREPARE (pg,
|
||||
"history_by_reserve_truncated",
|
||||
|
@ -1519,7 +1519,7 @@ out_conflict=FALSE;
|
||||
out_balance_ok=TRUE;
|
||||
|
||||
-- See if we can finish the merge or need to update the trigger time and partner.
|
||||
SELECT partner_serial_id
|
||||
SELECT COALESCE(partner_serial_id,0)
|
||||
,reserve_pub
|
||||
INTO psi
|
||||
,my_reserve_pub
|
||||
|
Loading…
Reference in New Issue
Block a user