From 9009a83ae138317a64e2dddb3d3c74e1044dafaa Mon Sep 17 00:00:00 2001 From: Michael Goldsmith Date: Tue, 6 Mar 2018 14:45:29 +1300 Subject: [PATCH] Revert back to previous version check to allow many many version objects to pass through the non-ORM method --- src/GridFieldOrderableRows.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/GridFieldOrderableRows.php b/src/GridFieldOrderableRows.php index f0aefd86..310dceea 100755 --- a/src/GridFieldOrderableRows.php +++ b/src/GridFieldOrderableRows.php @@ -531,8 +531,12 @@ protected function reorderItems($list, array $values, array $sortedIDs) // 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.