Skip to content

Commit a15acdd

Browse files
Merge pull request #140 from DoggersHusky/feature-fix-more-ambiguous
fix ambiguous error
2 parents 07d83cd + c3fcede commit a15acdd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Forms/GridFieldSortableRows.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ protected function fixSortColumn($gridField, SS_List $dataList)
335335
} else if ($this->append_to_top) {
336336
if ($hasVersioned) {
337337
// For versioned objects, modify them with the ORM so that the *_versions table is updated
338-
$itemsToUpdate = $modelClass::get()->where(($list instanceof RelationList ? '"' . $list->foreignKey . '" = ' . $owner->ID : '"' . $table . '".' . $idCondition) . (!empty($topIncremented) ? ' AND "ID" NOT IN(\'' . implode('\',\'', $topIncremented) . '\')' : ''));
338+
$itemsToUpdate = $modelClass::get()->where(($list instanceof RelationList ? '"' . $list->foreignKey . '" = ' . $owner->ID : '"' . $table . '".' . $idCondition) . (!empty($topIncremented) ? ' AND "' . $table . '"."ID" NOT IN(\'' . implode('\',\'', $topIncremented) . '\')' : ''));
339339
if ($itemsToUpdate->exists()) {
340340
foreach ($itemsToUpdate as $item) {
341341
$item->$sortColumn = $item->$sortColumn + 1;

0 commit comments

Comments
 (0)