aboutsummaryrefslogtreecommitdiff
path: root/src/exchangedb/pg_lookup_kyc_requirement_by_row.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2024-08-05 00:20:40 +0200
committerChristian Grothoff <christian@grothoff.org>2024-08-05 00:20:40 +0200
commit5f6a8a59398bbc546cf0fbb40cd3ff993fcd903c (patch)
treea4708ec74b4bc27aff3e5cdfb3b67584f41754e7 /src/exchangedb/pg_lookup_kyc_requirement_by_row.c
parentc93d1d9df27f8f873bdd3c693558319175ebf631 (diff)
limit join to active outcomes, or no outcome
Diffstat (limited to 'src/exchangedb/pg_lookup_kyc_requirement_by_row.c')
-rw-r--r--src/exchangedb/pg_lookup_kyc_requirement_by_row.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/exchangedb/pg_lookup_kyc_requirement_by_row.c b/src/exchangedb/pg_lookup_kyc_requirement_by_row.c
index f66627508..36ab3e756 100644
--- a/src/exchangedb/pg_lookup_kyc_requirement_by_row.c
+++ b/src/exchangedb/pg_lookup_kyc_requirement_by_row.c
@@ -80,8 +80,9 @@ TEH_PG_lookup_kyc_requirement_by_row (
" USING (access_token)"
" LEFT JOIN legitimization_outcomes lo"
" ON (wt.wire_target_h_payto = lo.h_payto)"
- " WHERE legitimization_measure_serial_id=$1"
- " AND lo.is_active;");
+ " WHERE lm.legitimization_measure_serial_id=$1"
+ " AND ( (lo.is_active IS NULL)"
+ " OR lo.is_active);");
return GNUNET_PQ_eval_prepared_singleton_select (
pg->conn,
"lookup_kyc_requirement_by_row",