Skip to content

Commit

Permalink
Merge pull request #38 from bakaphp/fix/sort-relations
Browse files Browse the repository at this point in the history
set previous relationSearchFields value if we dont have rparams
  • Loading branch information
kaioken authored Mar 6, 2020
2 parents cef98d8 + 96c2530 commit de36a46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Converter/RequestUriToSql.php
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ protected function prepareCustomSql(array $searchCriteria, Model $modules, strin
*/
protected function prepareParams(array $unparsed): void
{
$this->relationSearchFields = array_key_exists('rparams', $unparsed) ? $this->parseRelationParameters($unparsed['rparams']) : [];
$this->relationSearchFields = array_key_exists('rparams', $unparsed) ? $this->parseRelationParameters($unparsed['rparams']) : $this->relationSearchFields;
$this->customSearchFields = array_key_exists('cparams', $unparsed) ? $this->parseSearchParameters($unparsed['cparams'])['mapped'] : [];
$this->normalSearchFields = array_key_exists('params', $unparsed) ? $this->parseSearchParameters($unparsed['params'])['mapped'] : [];
}
Expand Down

0 comments on commit de36a46

Please sign in to comment.