commit 2ad078803a2960455949d2f1de2925c006b53d7a
parent 20e19b9dd884f3df6eb4ab6a4c2e495ffb7a64c2
Author: Florian Dold <dold@taler.net>
Date: Tue, 28 Jul 2026 12:31:47 +0200
kyclogic: fix broken expressions in two AML helper programs
defaults-but-investigate referenced an undefined jq variable and so always
exited 3, and tops-address-check had a jq path missing its leading dot plus
a misspelled shell variable that tripped "set -u" on legal entities.
Diffstat:
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/kyclogic/taler-exchange-helper-measure-defaults-but-investigate b/src/kyclogic/taler-exchange-helper-measure-defaults-but-investigate
@@ -93,4 +93,4 @@ DEFAULT_RULES=$(jq '.default_rules')
exec jq -n \
--argjson dr "$DEFAULT_RULES" \
- '{"new_rules":($dr+{"custom_measures":({}+$nr.custom_measures)}),"to_investigate":true}'
+ '{"new_rules":($dr+{"custom_measures":({}+$dr.custom_measures)}),"to_investigate":true}'
diff --git a/src/kyclogic/taler-exchange-helper-measure-tops-address-check b/src/kyclogic/taler-exchange-helper-measure-tops-address-check
@@ -100,14 +100,14 @@ in
CONTACT_PERSON=$(echo "$INPUTS" | jq -r '.attributes.CONTACT_PERSON_NAME // null')
if [ "null" != "$CONTACT_PERSON" ]
then
- CONTACT_NAME=$(echo -en "${BUSINESS_NAME}\nAttn. ${CONTACT_PERSON_NAME}")
+ CONTACT_NAME=$(echo -en "${BUSINESS_NAME}\nAttn. ${CONTACT_PERSON}")
else
CONTACT_NAME="$BUSINESS_NAME"
fi
;;
*)
# Strange, we don't know. Let's try everything...
- CONTACT_NAME=$(echo "$INPUTS" | jq -r '.attributes.CONTACT_NAME // attributes.FULL_NAME // .attributes.COMPANY_NAME')
+ CONTACT_NAME=$(echo "$INPUTS" | jq -r '.attributes.CONTACT_NAME // .attributes.FULL_NAME // .attributes.COMPANY_NAME')
;;
esac