diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 300cfa281b..b57eb7b85a 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -3033,9 +3033,12 @@ sub UpdateTotalIssues { return; } - my $record = $biblio->metadata->record; - unless ($record) { - carp "UpdateTotalIssues could not get biblio record"; + my $record; + eval { $record = $biblio->metadata->record }; + if ($@) { + my $exception = $@; + $exception->rethrow unless ( $exception->isa('Koha::Exceptions::Metadata::Invalid') ); + warn "UpdateTotalIssues could not get bibliographic record"; return; } my $biblioitem = $biblio->biblioitem;