From 5d8c81eadc4ddc0dbb689a02a0c2090dfd55362c Mon Sep 17 00:00:00 2001 From: Andreas Granig Date: Tue, 8 Oct 2013 16:01:18 +0200 Subject: [PATCH] MT#4213 Don't search for contract id twice. The result set is already complex enough :) --- lib/NGCP/Panel/Controller/Customer.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/NGCP/Panel/Controller/Customer.pm b/lib/NGCP/Panel/Controller/Customer.pm index f6197b6300..9d73b1b962 100644 --- a/lib/NGCP/Panel/Controller/Customer.pm +++ b/lib/NGCP/Panel/Controller/Customer.pm @@ -136,7 +136,7 @@ sub base :Chained('list_customer') :PathPart('') :CaptureArgs(1) { $contract_select_rs = $contract_select_rs->search({ 'me.id' => $contract_id, }); - my $product_id = $contract_select_rs->search({'me.id' => $contract_id})->first->get_column('product_id'); + my $product_id = $contract_select_rs->first->get_column('product_id'); NGCP::Panel::Utils::Message->error( c => $c, error => "No product for customer contract id $contract_id found",