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;
} elsif($c->user->roles eq "admin") {
}
$customers = $customers->search({
'contact.reseller_id' => $reseller_condition ,
});
if ($reseller_condition){
$customers = $customers->search({
'contact.reseller_id' => $reseller_condition ,
});
}
$customers = $customers->search({
'-or' => [

Loading…
Cancel
Save