From 1cdd999c960a9625e6c71e09c68f86c37f2996e5 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 27 Nov 2022 22:00:24 +0100 Subject: -fix foreign key constraint issue --- src/exchangedb/pg_do_purse_deposit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/exchangedb/pg_do_purse_deposit.c') diff --git a/src/exchangedb/pg_do_purse_deposit.c b/src/exchangedb/pg_do_purse_deposit.c index 51d4a3716..25496a262 100644 --- a/src/exchangedb/pg_do_purse_deposit.c +++ b/src/exchangedb/pg_do_purse_deposit.c @@ -42,7 +42,9 @@ TEH_PG_do_purse_deposit ( struct GNUNET_TIME_Timestamp reserve_expiration; uint64_t partner_id = 0; /* FIXME #7271: WAD support... */ struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_uint64 (&partner_id), + (0 == partner_id) + ? GNUNET_PQ_query_param_null () + : GNUNET_PQ_query_param_uint64 (&partner_id), GNUNET_PQ_query_param_auto_from_type (purse_pub), TALER_PQ_query_param_amount (amount), GNUNET_PQ_query_param_auto_from_type (coin_pub), -- cgit v1.2.3