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 <lucas@bywatersolutions.com>
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Nick Clemens 2023-10-17 19:15:24 +00:00 committed by Tomas Cohen Arazi
parent f7630f5de4
commit e8b66cadf2
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
1 changed files with 1 additions and 1 deletions

View File

@ -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');