Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit d600179

Browse files
committed
Fix issue causing attribute not loading with getList
As specified in issue #17759, CustomerRepository::getList() is unexpectedly returning NULL, when CustomerRepository::get() is correctly returning the value. Specifying the attribute as billing_company instead of company removes the conflict.
1 parent 3091634 commit d600179

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/code/Magento/Customer/Model/ResourceModel/CustomerRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ public function getList(SearchCriteriaInterface $searchCriteria)
342342
->joinAttribute('billing_telephone', 'customer_address/telephone', 'default_billing', null, 'left')
343343
->joinAttribute('billing_region', 'customer_address/region', 'default_billing', null, 'left')
344344
->joinAttribute('billing_country_id', 'customer_address/country_id', 'default_billing', null, 'left')
345-
->joinAttribute('company', 'customer_address/company', 'default_billing', null, 'left');
345+
->joinAttribute('billing_company', 'customer_address/company', 'default_billing', null, 'left');
346346

347347
$this->collectionProcessor->process($searchCriteria, $collection);
348348

app/code/Magento/Customer/Test/Unit/Model/ResourceModel/CustomerRepositoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ public function testGetList()
740740
->willReturnSelf();
741741
$collection->expects($this->at(7))
742742
->method('joinAttribute')
743-
->with('company', 'customer_address/company', 'default_billing', null, 'left')
743+
->with('billing_company', 'customer_address/company', 'default_billing', null, 'left')
744744
->willReturnSelf();
745745
$this->collectionProcessorMock->expects($this->once())
746746
->method('process')

0 commit comments

Comments
 (0)