Merge pull request #29171 from JonBendtsen/contact_update_single_array_option_element

allow updating contract single Complementary Attribute
This commit is contained in:
Laurent Destailleur 2024-04-02 14:49:35 +02:00 committed by GitHub
commit c64bba12ee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -507,6 +507,12 @@ class Contracts extends DolibarrApi
$this->contract->context['caller'] = sanitizeVal($request_data['caller'], 'aZ09');
continue;
}
if ($field == 'array_options' && is_array($value)) {
foreach ($value as $index => $val) {
$this->contract->array_options[$index] = $this->_checkValForAPI($field, $val, $this->contract);;
}
continue;
}
$this->contract->$field = $this->_checkValForAPI($field, $value, $this->contract);
}