From 3d3fc0f85a5fada38083a99fa8584ccc72c6d5bd 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 (cherry picked from commit 12bc623ae7bcbd03fd4c8505bf1c55010bb3d0f7) Signed-off-by: Lucas Gass --- 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 };