summaryrefslogtreecommitdiff
path: root/src/exchangedb/pg_do_purse_deposit.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-11-27 22:00:24 +0100
committerChristian Grothoff <christian@grothoff.org>2022-11-27 22:00:24 +0100
commit1cdd999c960a9625e6c71e09c68f86c37f2996e5 (patch)
treef6795ff2d65739ecf35c0fc59c039715dd73896d /src/exchangedb/pg_do_purse_deposit.c
parent68abe6d9fa82009893218f3f71c4ae675d8ea1d0 (diff)
downloadexchange-1cdd999c960a9625e6c71e09c68f86c37f2996e5.tar.gz
exchange-1cdd999c960a9625e6c71e09c68f86c37f2996e5.tar.bz2
exchange-1cdd999c960a9625e6c71e09c68f86c37f2996e5.zip
-fix foreign key constraint issue
Diffstat (limited to 'src/exchangedb/pg_do_purse_deposit.c')
-rw-r--r--src/exchangedb/pg_do_purse_deposit.c4
1 files changed, 3 insertions, 1 deletions
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),