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
(cherry picked from commit 59a960b784)
changes/34/25234/1
Kirill Solomko 7 years ago
parent 5eb2909da9
commit a090d4e35e

@ -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