Fixed GridFieldOrderableRows issue when data class is Versioned and relation is has_many (#243)

* Fixed GridFieldOrderableRows issue when data class is Versioned and relation is has_many

* just compare table names rather than updating existing getSortTable() func
This commit is contained in:
Priyashantha 2018-01-31 02:10:59 +05:30 committed by Robbie Averill
parent 509abf1532
commit 6d8b41ee5a

View File

@ -19,8 +19,8 @@ use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\DataObjectInterface;
use SilverStripe\ORM\DB;
use SilverStripe\ORM\ManyManyList;
use SilverStripe\ORM\Map;
use SilverStripe\ORM\SS_List;
use SilverStripe\ORM\SS_Map;
use SilverStripe\Versioned\Versioned;
use SilverStripe\View\ViewableData;
@ -529,7 +529,7 @@ class GridFieldOrderableRows extends RequestHandler implements
/** @var SS_List $map */
$map = $list->map('ID', $sortField);
//fix for versions of SS that return inconsistent types for `map` function
if ($map instanceof SS_Map) {
if ($map instanceof Map) {
$map = $map->toArray();
}