From 4f46208b2cf8243c293315807453d0c1f3d0c34e 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. Signed-off-by: Kathleen Milne --- Koha/StockRotationRota.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Koha/StockRotationRota.pm b/Koha/StockRotationRota.pm index e6aa4b2385..fdf52fccd9 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.11.0