From 90edea83a7e4486fdab509db716faeaf5c3e1eeb 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 --- 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.20.1