Merge pull request #29184 from JonBendtsen/membertype_update_single_array_option_element
allow updating membertypes single Complementary Attribute
This commit is contained in:
commit
e3ce83dee8
1 changed files with 6 additions and 2 deletions
|
|
@ -481,7 +481,6 @@ class Members extends DolibarrApi
|
|||
}
|
||||
|
||||
if ($object instanceof AdherentType) {
|
||||
unset($object->array_options);
|
||||
unset($object->linkedObjectsIds);
|
||||
unset($object->context);
|
||||
unset($object->canvas);
|
||||
|
|
@ -800,7 +799,12 @@ class Members extends DolibarrApi
|
|||
$membertype->context['caller'] = sanitizeVal($request_data['caller'], 'aZ09');
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($field == 'array_options' && is_array($value)) {
|
||||
foreach ($value as $index => $val) {
|
||||
$membertype->array_options[$index] = $val;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
// Process the status separately because it must be updated using
|
||||
// the validate(), resiliate() and exclude() methods of the class AdherentType.
|
||||
$membertype->$field = $this->_checkValForAPI($field, $value, $membertype);
|
||||
|
|
|
|||
Loading…
Reference in a new issue