commit d6f66eba1773bdb3eddb3b4860505a8cd36b91e1
parent 218fe2c253c73312cf5887c69b40d1aef05e0403
Author: Iván Ávalos <avalos@disroot.org>
Date: Wed, 30 Jul 2025 16:28:12 +0200
handle empty extra_data on token family update
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/backenddb/pg_update_token_family.c b/src/backenddb/pg_update_token_family.c
@@ -18,6 +18,7 @@
* @brief Implementation of the update_token_family function for Postgres
* @author Christian Blättler
*/
+#include "gnunet/gnunet_pq_lib.h"
#include "platform.h"
#include <taler/taler_error_codes.h>
#include <taler/taler_dbevents.h>
@@ -41,7 +42,9 @@ TMH_PG_update_token_family (
GNUNET_PQ_query_param_string (details->name),
GNUNET_PQ_query_param_string (details->description),
TALER_PQ_query_param_json (details->description_i18n),
- TALER_PQ_query_param_json (details->extra_data),
+ (details->extra_data == NULL)
+ ? GNUNET_PQ_query_param_null ()
+ : TALER_PQ_query_param_json (details->extra_data),
GNUNET_PQ_query_param_timestamp (&details->valid_after),
GNUNET_PQ_query_param_timestamp (&details->valid_before),
GNUNET_PQ_query_param_end