Skip to content

Commit

Permalink
[BUGFIX][11022] return original search criteria in search result
Browse files Browse the repository at this point in the history
  • Loading branch information
David Verholen committed Oct 13, 2017
1 parent 583d6dc commit 2220ab4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,15 @@ public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCr
->create(),
]
);

$this->searchCriteriaBuilder->setSortOrders((array)$searchCriteria->getSortOrders());
$this->searchCriteriaBuilder->setCurrentPage($searchCriteria->getCurrentPage());
$this->searchCriteriaBuilder->setPageSize($searchCriteria->getPageSize());
return $this->attributeSetRepository->getList($this->searchCriteriaBuilder->create());

$searchResult = $this->attributeSetRepository->getList($this->searchCriteriaBuilder->create());
$searchResult->setSearchCriteria($searchCriteria);

return $searchResult;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,19 +165,9 @@ public function testGetList()
{
$searchCriteria = [
'searchCriteria' => [
'filter_groups' => [
[
'filters' => [
[
'field' => 'entity_type_code',
'value' => 'catalog_product',
'condition_type' => 'eq',
],
],
],
],
'filter_groups' => [],
'current_page' => 1,
'page_size' => 2,
'page_size' => 2
],
];

Expand Down

0 comments on commit 2220ab4

Please sign in to comment.