From b70eb9da7467acf91908708c441dddf3937a7de3 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 Signed-off-by: David Nind --- C4/AuthoritiesMarc.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm index 46533184e32..677f03d03cf 100644 --- a/C4/AuthoritiesMarc.pm +++ b/C4/AuthoritiesMarc.pm @@ -648,7 +648,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.20.1