From cf315cc37c81496ccb76d51f84aa795c94659c3b Mon Sep 17 00:00:00 2001 From: Alex Sassmannshausen Date: Thu, 27 Apr 2017 07:59:53 +0000 Subject: [PATCH] Bug 11897: Bugfix: Handle empty rotas. * Koha/StockRotationRota.pm (investigate): If current rota has no stages, return empty items & log entries in report. --- Koha/StockRotationRota.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Koha/StockRotationRota.pm b/Koha/StockRotationRota.pm index e6aa4b2..fdf52fc 100644 --- a/Koha/StockRotationRota.pm +++ b/Koha/StockRotationRota.pm @@ -152,8 +152,8 @@ sub investigate { push @{$report->{rotas}}, { name => $self->title, id => $self->rota_id, - items => $report->{tmp_items}, - log => $report->{tmp_log}, + items => $report->{tmp_items} || [], + log => $report->{tmp_log} || [], }; delete $report->{tmp_items}; delete $report->{tmp_log}; -- 2.1.4