commit 135ee372150641acfed4ef5ee4a396e3910a321b
parent 2557b51766384f0af88c7af96c22728f6df89aa4
Author: Christian Grothoff <christian@grothoff.org>
Date: Thu, 13 Aug 2026 21:39:18 +0200
allow null for fields that can be NULL
Diffstat:
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/src/lib/merchant_api_patch-private-products-PRODUCT_ID.c b/src/lib/merchant_api_patch-private-products-PRODUCT_ID.c
@@ -471,8 +471,9 @@ TALER_MERCHANT_patch_private_product_start (
: pph->product_name),
GNUNET_JSON_pack_string ("description",
pph->description),
- GNUNET_JSON_pack_object_incref ("description_i18n",
- pph->description_i18n),
+ GNUNET_JSON_pack_allow_null (
+ GNUNET_JSON_pack_object_incref ("description_i18n",
+ pph->description_i18n)),
GNUNET_JSON_pack_allow_null (
GNUNET_JSON_pack_array_steal ("categories",
categories)),
@@ -481,16 +482,19 @@ TALER_MERCHANT_patch_private_product_start (
TALER_JSON_pack_amount_array ("unit_price",
pph->unit_price_len,
pph->unit_prices),
- GNUNET_JSON_pack_string ("image",
- pph->image),
- GNUNET_JSON_pack_array_incref ("taxes",
- pph->taxes),
+ GNUNET_JSON_pack_allow_null (
+ GNUNET_JSON_pack_string ("image",
+ pph->image)),
+ GNUNET_JSON_pack_allow_null (
+ GNUNET_JSON_pack_array_incref ("taxes",
+ pph->taxes)),
GNUNET_JSON_pack_string ("unit_total_stock",
unit_total_stock_buf),
GNUNET_JSON_pack_uint64 ("total_lost",
pph->total_lost),
- GNUNET_JSON_pack_object_incref ("address",
- pph->address),
+ GNUNET_JSON_pack_allow_null (
+ GNUNET_JSON_pack_object_incref ("address",
+ pph->address)),
GNUNET_JSON_pack_allow_null (
GNUNET_JSON_pack_timestamp ("next_restock",
pph->next_restock)));