Skip to content

Commit

Permalink
Merge remote-tracking branch 'tango/MC-20381' into Chaika-PR-2019-09-26
Browse files Browse the repository at this point in the history
  • Loading branch information
veloraven committed Sep 26, 2019
2 parents acae330 + 4844c67 commit b98bee8
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,12 @@ protected function buildQueries(array $matches, array $queryValue)

$transformedTypes = [];
foreach ($matches as $match) {
$attributeAdapter = $this->attributeProvider->getByAttributeCode($match['field']);
$resolvedField = $this->fieldMapper->getFieldName(
$match['field'],
['type' => FieldMapperInterface::TYPE_QUERY]
);

$attributeAdapter = $this->attributeProvider->getByAttributeCode($resolvedField);
$fieldType = $this->fieldTypeResolver->getFieldType($attributeAdapter);
$valueTransformer = $this->valueTransformerPool->get($fieldType ?? 'text');
$valueTransformerHash = \spl_object_hash($valueTransformer);
Expand All @@ -151,10 +156,6 @@ protected function buildQueries(array $matches, array $queryValue)
continue;
}

$resolvedField = $this->fieldMapper->getFieldName(
$match['field'],
['type' => FieldMapperInterface::TYPE_QUERY]
);
$conditions[] = [
'condition' => $queryValue['condition'],
'body' => [
Expand Down

0 comments on commit b98bee8

Please sign in to comment.