diff --git a/C4/ILSDI/Services.pm b/C4/ILSDI/Services.pm index 5534d3ccbc..9498a77db0 100644 --- a/C4/ILSDI/Services.pm +++ b/C4/ILSDI/Services.pm @@ -209,14 +209,13 @@ sub GetRecords { # Get the biblioitem from the biblionumber my $biblio = Koha::Biblios->find( $biblionumber ); - my $biblioitem = $biblio->biblioitem; - if ( $biblioitem ) { - $biblioitem = $biblioitem->unblessed; - } else { - $biblioitem->{code} = "RecordNotFound"; - # FIXME We should not need to process something else; next? + unless ( $biblio ) { + push @records, { code => "RecordNotFound" }; + next; } + my $biblioitem = $biblio->biblioitem->unblessed; + my $embed_items = 1; my $record = GetMarcBiblio({ biblionumber => $biblionumber,