From 2a1c7043fda25bec1eae61f5e992b5005f371cc6 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 26 Jul 2022 10:12:05 -0300 Subject: [PATCH] Bug 31223: Do not try to report results if task not started 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 d01aed7f39b..d12c08497c7 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.34.1