Skip to content
Snippets Groups Projects
Commit c11aca0e authored by pcambra's avatar pcambra Committed by MegaChriz
Browse files

Issue #2619788 by pcambra: Get instance info from the entity instead of from...

Issue #2619788 by pcambra: Get instance info from the entity instead of from the source for file mappings
parent 20f741c5
No related branches found
No related tags found
No related merge requests found
......@@ -79,9 +79,14 @@ function file_feeds_set_target(FeedsSource $source, $entity, $target, array $val
}
}
$entity_type = $source->importer->processor->entityType();
$bundle = $source->importer->processor->bundle();
if ($entity instanceof Entity) {
$entity_type = $entity->entityType();
$bundle = $entity->bundle();
}
else {
$entity_type = $source->importer->processor->entityType();
$bundle = $source->importer->processor->bundle();
}
$instance_info = field_info_instance($entity_type, $field_name, $bundle);
// Determine file destination.
......
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