MT#11343 Prevent PbxDevicemodels API from subscribers lineranges

Change-Id: Iafeaad73731edc1fca85b5acf29985d16c8fa542
changes/68/968/1
Irina Peshinskaya 11 years ago
parent 950773557e
commit 0de1fb9e83

@ -241,8 +241,15 @@ sub update_item {
}
}
# delete invalid range ids (e.g. removed ones)
#model update should never impact on subscribers lines
$range_rs->search({
id => { 'not in' => \@existing_range },
-and => [
id => { 'not in' => \@existing_range },
id => { 'not in' => $c->model('DB')->resultset('autoprov_field_device_lines')->search(undef,{
columns => [ qw/linerange_id/ ],
group_by => [ qw/linerange_id/ ],
})->get_column('linerange_id')->as_query },
]
})->delete_all;
return $item;

Loading…
Cancel
Save