Revert back to previous version check to allow many many version objects to pass through the non-ORM method

This commit is contained in:
Michael Goldsmith 2018-03-06 14:45:29 +13:00
parent 8e24be2660
commit 9009a83ae1

View File

@ -531,8 +531,12 @@ class GridFieldOrderableRows extends RequestHandler implements
// If not a ManyManyList and using versioning, detect it.
$this->validateSortField($list);
$isVersioned = false;
$class = $list->dataClass();
$isVersioned = $class::has_extension(Versioned::class);
if (DataObject::getSchema()->tableName($class) == $this->getSortTable($list)) {
$isVersioned = $class::has_extension(Versioned::class);
}
// Loop through each item, and update the sort values which do not
// match to order the objects.