Skip to content

Commit

Permalink
FIX silverstripe#7 $has_one config is now inherited
Browse files Browse the repository at this point in the history
Fixes bug where no default $has_one field would be found if the relation
is on the parent class
  • Loading branch information
colymba committed Jan 9, 2013
1 parent beb1d46 commit efe4e35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/GridFieldBulkImageUpload_Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function getRecordEditableFields()
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 )
Expand Down

0 comments on commit efe4e35

Please sign in to comment.