MT#7309 API fix updating autoattendants

correct validation on empty array (allowed)
set uuid field
mr3.3.1
Gerhard Jungwirth 12 years ago
parent 2e1b9135a6
commit e02841d769

@ -11,7 +11,6 @@ sub build_form_element_class {return [qw(form-horizontal)]}
has_field 'slots' => (
type => 'Repeatable',
label => 'IVR Slots',
required => 1,
);
has_field 'slots.slot' => (

@ -110,11 +110,12 @@ sub update_item {
$aa_rs->create({
destination => $self->get_sip_uri($aa->{destination}, $domain),
choice => $aa->{slot},
uuid => $prov_subs->uuid,
});
}
} catch($e) {
$c->log->error("failed to update speeddials: $e");
$self->error($c, HTTP_INTERNAL_SERVER_ERROR, "Failed to update speeddials.");
$c->log->error("failed to update autoattendants: $e");
$self->error($c, HTTP_INTERNAL_SERVER_ERROR, "Failed to update autoattendants.");
return;
};

Loading…
Cancel
Save