fix: [Component:CRUD] Prevent duplication of first metafield if it was unmodified
parent
c13fb53ae0
commit
aa351b3ccb
|
@ -400,7 +400,7 @@ class CRUDComponent extends Component
|
|||
} else {
|
||||
$new_value = $meta_field['value'];
|
||||
if (!empty($new_value)) { // update meta_field and attach validation errors
|
||||
if (!empty($metaFieldsIndex[$meta_field_id])) {
|
||||
if (isset($metaFieldsIndex[$meta_field_id])) {
|
||||
$index = $metaFieldsIndex[$meta_field_id];
|
||||
$metaFieldsTable->patchEntity($entity->meta_fields[$index], [
|
||||
'value' => $new_value, 'meta_template_field_id' => $rawMetaTemplateField->id
|
||||
|
|
Loading…
Reference in New Issue