Skip to content

Commit

Permalink
Revert back to previous version check to allow many many version obje…
Browse files Browse the repository at this point in the history
…cts to pass through the non-ORM method
  • Loading branch information
Michael Goldsmith committed Mar 6, 2018
1 parent 8e24be2 commit 9009a83
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/GridFieldOrderableRows.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 9009a83

Please sign in to comment.