Merge pull request #2411 from simonwelsh/circ_ref

Revert "Merge pull request #2390 from phptek/2389"
This commit is contained in:
Simon Welsh 2013-10-28 14:05:13 -07:00
commit 60bb9d81c5

View File

@ -230,11 +230,6 @@ class GridFieldAddExistingAutocompleter
$json = array();
foreach($results as $result) {
// Prevent a circular reference and associated error in CMS/admin
$hideFromSearch = ($gridField->getForm()->getRecord() && ($result->ID == $gridField->getForm()->getRecord()->ID));
if($hideFromSearch) {
continue;
}
$json[$result->ID] = SSViewer::fromString($this->resultsFormat)->process($result);
}
return Convert::array2json($json);