Skip to content

Commit

Permalink
if no content object, make no call to get content
Browse files Browse the repository at this point in the history
  • Loading branch information
ychadwick committed Mar 8, 2016
1 parent 4859828 commit d6dc98e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Exporter/Exporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,12 @@ protected function getTranslatableValue(TranslatableFieldMap $field, $entity)
if(class_exists('\Gedmo\Tool\Wrapper\AbstractWrapper')){
$wrapped = \Gedmo\Tool\Wrapper\AbstractWrapper::wrap($entity, $field->getAdapter()->getObjectManager());
$data = $field->getAdapter()->findTranslation($wrapped, $field->getLocale(), $field->getPropertyPath(), $field->getTranslatableClass(), $field->getClass());
return $data->getContent();
$className = $field->getTranslatableClass();

if($data instanceof $className){
return $data->getContent();
}

}

return $this->getColumnData($entity, $field->getPropertyPath());
Expand Down

0 comments on commit d6dc98e

Please sign in to comment.