TT#47587 fix get_subscriber_location_rs

* get_subscriber_location_rs for the DB model
      tried to determine filter based only on username
      and domain for the multidomain option but
      another use of the function was with passing only
      the id. Since the filter argument is built outside
      the function with already checking for the multidomain
      option there is no need to rely on the filter parameters
      in the function itself.

Change-Id: Ie5ad7e58404400d0dda0300720edd55f38eca09c
changes/67/24867/3
Kirill Solomko 8 years ago
parent 7e3a1d1cd2
commit 59a960b784

@ -55,15 +55,7 @@ sub get_subscriber_location_rs {
return;
}
} else {
my $reg_rs = $c->model('DB')->resultset('location')->search({
username => $filter->{username},
});
if($c->config->{features}->{multidomain}) {
$reg_rs = $reg_rs->search({
domain => $filter->{domain},
});
}
return $reg_rs;
return $c->model('DB')->resultset('location')->search($filter);
}
}

Loading…
Cancel
Save