Skip to content

Commit 5580b0c

Browse files
author
Bryant Luk
committed
MAGETWO-38823: Stabilize builds
- Fix the default sort order for group repository so that all clients will be "nice"
1 parent 6e46c0d commit 5580b0c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/code/Magento/Customer/Model/Resource/GroupRepository.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,11 @@ public function getList(SearchCriteriaInterface $searchCriteria)
193193
($sortOrder->getDirection() == SearchCriteriaInterface::SORT_ASC) ? 'ASC' : 'DESC'
194194
);
195195
}
196+
} else {
197+
// set a default sorting order since this method is used constantly in many
198+
// different blocks
199+
$field = $this->translateField('id');
200+
$collection->addOrder($field, 'ASC');
196201
}
197202
$collection->setCurPage($searchCriteria->getCurrentPage());
198203
$collection->setPageSize($searchCriteria->getPageSize());

0 commit comments

Comments
 (0)