MT#61673 /api/calllists fix missing type response field

* The 'type' field is now present in the reponse as it's
  described in the form and also the search params but
  was not rendered correctly because in the database it is
  as 'call_type'

Change-Id: If7b69a33ed9578be6873462dbab79c9a2079b076
mr13.1
Kirill Solomko 5 months ago
parent 019f8e81a7
commit 1873193814

@ -51,6 +51,10 @@ sub process_cdr_item {
$params //= $c->req->params;
map { $resource->{$_} = $item->get_column($_); } qw/id call_id call_type/;
# it's call_type in the DB but type in the form
$resource->{type} = delete $resource->{call_type};
if ($item->can('cdr_mos_data') and (my $mos_data = $item->cdr_mos_data)) {
my %mos_data_res = $mos_data->get_inflated_columns;
map { $resource->{$_} = $mos_data_res{$_}; } qw/mos_average mos_average_packetloss mos_average_jitter mos_average_roundtrip/;

Loading…
Cancel
Save