TT#133901 fix administrative flag for subscriberadmin

* 'administrative' field is read only for susbcriberadmin
  role and that caused it to be removed from the final
  update 'resource', setting it to 0 if not existed.
  now the 'administrative' field is only changed in the database
  if it's defined in the 'resource'.

Change-Id: I50738a77052c2163b19b2a42293c7a00e2780bc3
(cherry picked from commit 3ef167575c)
mr9.5.4
Kirill Solomko 4 years ago
parent 1870bb7bdf
commit 2a438339ef

@ -531,13 +531,13 @@ sub update_item {
password => $resource->{password},
webusername => $resource->{webusername},
webpassword => $resource->{webpassword},
admin => $resource->{administrative} // 0,
is_pbx_pilot => $resource->{is_pbx_pilot} // 0,
is_pbx_group => $resource->{is_pbx_group} // 0,
modify_timestamp => NGCP::Panel::Utils::DateTime::current_local,
profile_set_id => $profile_set ? $profile_set->id : undef,
profile_id => $profile ? $profile->id : undef,
pbx_extension => $resource->{pbx_extension},
$resource->{administrative} ? (admin => $resource->{administrative}) : (),
};
if(is_true($resource->{is_pbx_group})) {
$provisioning_res->{pbx_hunt_policy} = $resource->{pbx_hunt_policy};

Loading…
Cancel
Save