mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-10 03:23:19 +00:00
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:
@@ -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(),
|
||||
|
Reference in New Issue
Block a user