TT#19459 check for undefined CF sourceset mode

* CF source set is optional, in this case its value
      should be default to 'whitelist'

Change-Id: If521c5ebf361ff22f5c491f4cfd7e26fad5476d8
changes/60/14660/1
Kirill Solomko 8 years ago
parent ad5f1b2ef7
commit 3c6dba6070

@ -327,6 +327,7 @@ sub _contents_from_cfm {
my $timeset_item = $cfm_item->time_set;
my $dset_item = $cfm_item->destination_set;
my $sourceset_item = $cfm_item->source_set;
my $sourceset_mode = $sourceset_item ? $sourceset_item->mode : 'whitelist';
for my $time ($timeset_item ? $timeset_item->voip_cf_periods->all : () ) {
push @times, {$time->get_inflated_columns};
delete @{$times[-1]}{'time_set_id', 'id'};
@ -349,7 +350,7 @@ sub _contents_from_cfm {
delete @{$sources[-1]}{'source_set_id', 'id'};
}
return {times => \@times, destinations => \@destinations,
sources => \@sources, sources_mode => $sourceset_item->mode};
sources => \@sources, sources_mode => $sourceset_mode};
}
1;

Loading…
Cancel
Save