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:
parent
f7630f5de4
commit
e8b66cadf2
2
svc/bib
2
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');
|
||||
|
|
|
|||
Loading…
Reference in New Issue