From 74781994673af6db4dc67486b7265c398c347966 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 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