From 89e9e5dbb9cebcfefa9b3cd7210b9475cf9134b4 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 4 Jul 2014 10:40:23 +0200 Subject: [PATCH] =?utf8?q?PreisTaxCalculator:=20Caching-Abfrage=20f=C3=BCr?= =?utf8?q?=20=C2=BBkeine=20Positionen=C2=AB=20gefixt?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DB/Helper/PriceTaxCalculator.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SL/DB/Helper/PriceTaxCalculator.pm b/SL/DB/Helper/PriceTaxCalculator.pm index ed485c190..a067bd4f5 100644 --- a/SL/DB/Helper/PriceTaxCalculator.pm +++ b/SL/DB/Helper/PriceTaxCalculator.pm @@ -19,7 +19,7 @@ sub calculate_prices_and_taxes { require SL::DB::PriceFactor; require SL::DB::Unit; - SL::DB::Part->load_cached(map { $_->parts_id } @{ $self->items }); + SL::DB::Part->load_cached(map { $_->parts_id } @{ $self->items }) if @{ $self->items }; my %units_by_name = map { ( $_->name => $_ ) } @{ SL::DB::Manager::Unit->get_all }; my %price_factors_by_id = map { ( $_->id => $_ ) } @{ SL::DB::Manager::PriceFactor->get_all }; -- 2.20.1