From bb85104c04906f3f734ccb7762743b4245f5765d Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Mon, 2 May 2022 16:56:37 +1200 Subject: [PATCH] Bug 30358: (follow-up) Put multiple subfields fix on auth side --- C4/AuthoritiesMarc.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm index 32f1275aa6f..26f1149bd2f 100644 --- a/C4/AuthoritiesMarc.pm +++ b/C4/AuthoritiesMarc.pm @@ -683,7 +683,8 @@ sub AddAuthority { my $value = $subfield->[1]; $value =~ s/[\n\r]+/ /g; $value =~ s/^\s+|\s+$|^\t+|\t+$//g; - $field->update( $key => $value ); + $field->add_subfields( $key => $value ); # add subfield to the end of the subfield list + $field->delete_subfield( pos => 0 ); # delete the subfield at the top of the subfield list } } } -- 2.11.0