From efe4e35c9cf6432681ea5a7db7191a76f9bd108d Mon Sep 17 00:00:00 2001 From: colymba Date: Wed, 9 Jan 2013 23:28:55 +0200 Subject: [PATCH] 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 --- code/GridFieldBulkImageUpload_Request.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/GridFieldBulkImageUpload_Request.php b/code/GridFieldBulkImageUpload_Request.php index fb423ea..26a6eff 100644 --- a/code/GridFieldBulkImageUpload_Request.php +++ b/code/GridFieldBulkImageUpload_Request.php @@ -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 )