Skip to content
Snippets Groups Projects
Commit a5e7c596 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2162005 followup by Berdir: Clean up entity_reference default values...

Issue #2162005 followup by Berdir: Clean up entity_reference default values once users 0 and 1 provides UUID.
parent d7d58725
No related branches found
No related tags found
No related merge requests found
......@@ -72,11 +72,12 @@ public static function processDefaultValue($default_value, ContentEntityInterfac
->getStorage($target_type)
->loadMultiple($entity_ids);
$entity_uuids = array();
foreach ($entities as $id => $entity) {
$entity_uuids[$entity->uuid()] = $id;
}
foreach ($uuids as $delta => $uuid) {
if ($entity_uuids[$uuid]) {
if (isset($entity_uuids[$uuid])) {
$default_value[$delta]['target_id'] = $entity_uuids[$uuid];
unset($default_value[$delta]['target_uuid']);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment