FIX #7 $has_one config is now inherited

Fixes bug where no default $has_one field would be found if the relation
is on the parent class
This commit is contained in:
colymba 2013-01-09 23:28:55 +02:00
parent beb1d46aa6
commit efe4e35c9c

View File

@ -105,7 +105,7 @@ class GridFieldBulkImageUpload_Request extends RequestHandler {
function getDefaultRecordImageField()
{
$recordClass = $this->gridField->list->dataClass;
$recordHasOneFields = Config::inst()->get($recordClass, 'has_one', Config::UNINHERITED);
$recordHasOneFields = Config::inst()->get($recordClass, 'has_one', Config::INHERITED);
$imageField = null;
foreach( $recordHasOneFields as $field => $type )