From 1668c74d52020523fd1ca6163f72a01158cceb51 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Mon, 3 Mar 2025 15:38:32 -0100 Subject: [PATCH] Bug 37901: Preparation: Update borrower attribute types logic This now conforms to the new pseudonymized_metadata_values instead of pseudonymized_borrower_attributes Signed-off-by: Jeremy Evans --- Koha/PseudonymizedTransaction.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Koha/PseudonymizedTransaction.pm b/Koha/PseudonymizedTransaction.pm index b29e1b0a5cc..1c66f0a352c 100644 --- a/Koha/PseudonymizedTransaction.pm +++ b/Koha/PseudonymizedTransaction.pm @@ -111,8 +111,11 @@ sub create_from_statistic { for my $attribute (@$extended_attributes) { delete $attribute->{id}; delete $attribute->{borrowernumber}; + $attribute->{key} = delete $attribute->{code}; + $attribute->{value} = delete $attribute->{attribute}; + $attribute->{tablename} = 'borrower_attributes'; - $self->_result->create_related( 'pseudonymized_borrower_attributes', $attribute ); + $self->_result->create_related( 'pseudonymized_metadata_values', $attribute ); } } } -- 2.39.5