MT#14391 Correctly select alias nums on subscriber edit

previously all primary numbers have been filtered out.
This is wrong, if the number has been the primary number
of a previous (terminated) subscriber.

Change-Id: Iebbd96898715d86bfd10ac6d2d084c46de08def6
changes/59/2359/2
Gerhard Jungwirth 10 years ago
parent 4822328e00
commit 4fecd3d2bb

@ -1102,7 +1102,7 @@ sub prepare_alias_select {
prefetch => 'subscriber',
});
for my $num($num_rs->all) {
next if ($num->voip_subscribers->first); # is a primary number
next if ($num->id == $subscriber->primary_number_id); # is our primary number
next unless ($num->subscriber_id == $subscriber->id);
push @alias_nums, { e164 => { cc => $num->cc, ac => $num->ac, sn => $num->sn } };
unless($unselect) {

Loading…
Cancel
Save