Bug 34786: after_biblio_action hooks - No find when action is delete

Test plan:
Run t/db_dependent/Koha/Plugins/Biblio_and_Items_plugin_hooks.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ac7581e90a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Marcel de Rooy 2023-09-14 09:11:56 +00:00 committed by Fridolin Somers
parent 87ec1caebc
commit 4aedaed0bc
1 changed files with 2 additions and 2 deletions

View File

@ -3169,9 +3169,9 @@ sub _after_biblio_action_hooks {
my ( $args ) = @_;
my $biblio_id = $args->{biblio_id};
my $action = $args->{action};
my $action = $args->{action} // q{};
my $biblio = Koha::Biblios->find( $biblio_id );
my $biblio = $action ne 'delete' ? Koha::Biblios->find($biblio_id) : undef;
Koha::Plugins->call(
'after_biblio_action',
{