From e8b66cadf2e2e313663544d3978e9c8b1ddeba32 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Tue, 17 Oct 2023 19:15:24 +0000 Subject: [PATCH] Bug 34014: (follow-up) No need to parse old record before updating If the old record doesn't parse correctly it will cause a failure - the check is just to ensure we are editing an existing biblio, just getting the metadata object should confirm it exists Signed-off-by: Lucas Gass Signed-off-by: Kelly McElligott Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi --- svc/bib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svc/bib b/svc/bib index 206778058b..0667c0de4b 100755 --- a/svc/bib +++ b/svc/bib @@ -89,7 +89,7 @@ sub update_bib { my $query = shift; my $biblionumber = shift; my $biblio = Koha::Biblios->find( $biblionumber ); - my $old_record = $biblio->metadata->record; + my $old_record = $biblio->metadata; my $frameworkcode = $query->url_param('frameworkcode') // GetFrameworkCode($biblionumber); unless (defined $old_record) { print $query->header(-type => 'text/xml', -status => '404 Not Found'); -- 2.39.2