PHRAS-3397_doubles-in-multi-values_MASTER

fix : adding/replacing values set_metadata() cannot create doubles in multi-v fields
This commit is contained in:
jygaulier
2021-03-18 18:16:39 +01:00
parent a350d49990
commit 00845c58a1
2 changed files with 81 additions and 15 deletions

View File

@@ -293,6 +293,7 @@ class caption_Field_Value implements cache_cacheableInterface
$connection = $databox_field->get_connection();
// Check consistency
// if a field is mono and already has a value, we override it by "set_value()"
if (!$databox_field->is_multi()) {
try {
$field = $record->get_caption()->get_field($databox_field->get_name());
@@ -311,6 +312,7 @@ class caption_Field_Value implements cache_cacheableInterface
}
}
// here we create a new field
$data = [
'record_id' => $record->getRecordId(),
'meta_struct_id' => $databox_field->get_id(),