From 31416a51f971711ea59778f754bf5e3321a402d5 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 --- Koha/PseudonymizedTransaction.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Koha/PseudonymizedTransaction.pm b/Koha/PseudonymizedTransaction.pm index f456c4d8403..c85bd4dce13 100644 --- a/Koha/PseudonymizedTransaction.pm +++ b/Koha/PseudonymizedTransaction.pm @@ -105,8 +105,11 @@ sub new_from_statistic { 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