MT#5879: Fix applying empty search for admin

agranig/subprof
Irka 12 years ago
parent b61732daa5
commit 9b60794394

@ -216,9 +216,11 @@ sub get_contracts_rs_sippbx{
$reseller_condition = $c->user->contract->contact->reseller_id; $reseller_condition = $c->user->contract->contact->reseller_id;
} elsif($c->user->roles eq "admin") { } elsif($c->user->roles eq "admin") {
} }
$customers = $customers->search({ if ($reseller_condition){
'contact.reseller_id' => $reseller_condition , $customers = $customers->search({
}); 'contact.reseller_id' => $reseller_condition ,
});
}
$customers = $customers->search({ $customers = $customers->search({
'-or' => [ '-or' => [

Loading…
Cancel
Save