From 12bc623ae7bcbd03fd4c8505bf1c55010bb3d0f7 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 26 Jul 2022 10:12:05 -0300 Subject: [PATCH] Bug 31245: Do not try to report results if task not started Signed-off-by: Tomas Cohen Arazi Signed-off-by: Kyle M Hall Signed-off-by: Andrew Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi --- Koha/BackgroundJob/BatchUpdateItem.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Koha/BackgroundJob/BatchUpdateItem.pm b/Koha/BackgroundJob/BatchUpdateItem.pm index d01aed7f39..d12c08497c 100644 --- a/Koha/BackgroundJob/BatchUpdateItem.pm +++ b/Koha/BackgroundJob/BatchUpdateItem.pm @@ -171,6 +171,8 @@ Sent the infos to generate the table containing the details of the modified item sub additional_report { my ( $self, $args ) = @_; + return unless $self->report->{modified_itemnumbers}; + my $itemnumbers = $self->report->{modified_itemnumbers}; if ( scalar(@$itemnumbers) > C4::Context->preference('MaxItemsToDisplayForBatchMod') ) { return { too_many_items_display => 1 }; -- 2.39.5