Skip to content

Commit 3fe90d1

Browse files
author
Oleksii Korshenko
committed
Merge remote-tracking branch 'south/BUGS' into magento2
2 parents b554d2b + 0421bc7 commit 3fe90d1

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,7 @@ public function save(\Magento\Customer\Api\Data\CustomerInterface $customer, $pa
192192
$customerModel->setRpToken(null);
193193
$customerModel->setRpTokenCreatedAt(null);
194194
}
195-
196-
$this->customerResourceModel->save($customerModel);
195+
$customerModel->save();
197196
$this->customerRegistry->push($customerModel);
198197
$customerId = $customerModel->getId();
199198

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ public function testSave()
268268
'setRpTokenCreatedAt',
269269
'getDataModel',
270270
'setPasswordHash',
271+
'save',
271272
],
272273
[],
273274
'',
@@ -402,9 +403,8 @@ public function testSave()
402403
$customerModel->expects($this->atLeastOnce())
403404
->method('getId')
404405
->willReturn($customerId);
405-
$this->customerResourceModel->expects($this->once())
406-
->method('save')
407-
->with($customerModel);
406+
$customerModel->expects($this->once())
407+
->method('save');
408408
$this->customerRegistry->expects($this->once())
409409
->method('push')
410410
->with($customerModel);
@@ -486,6 +486,7 @@ public function testSaveWithPasswordHash()
486486
'setRpTokenCreatedAt',
487487
'getDataModel',
488488
'setPasswordHash',
489+
'save',
489490
],
490491
[],
491492
'',
@@ -579,9 +580,8 @@ public function testSaveWithPasswordHash()
579580
$customerModel->expects($this->atLeastOnce())
580581
->method('getId')
581582
->willReturn($customerId);
582-
$this->customerResourceModel->expects($this->once())
583-
->method('save')
584-
->with($customerModel);
583+
$customerModel->expects($this->once())
584+
->method('save');
585585
$this->customerRegistry->expects($this->once())
586586
->method('push')
587587
->with($customerModel);

app/code/Magento/CustomerImportExport/Model/Import/Address.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,7 @@ protected function _prepareDataForUpdate(array $rowData)
543543
}
544544

545545
// let's try to find region ID
546+
$entityRow['region_id'] = null;
546547
if (!empty($rowData[self::COLUMN_REGION])) {
547548
$countryNormalized = strtolower($rowData[self::COLUMN_COUNTRY_ID]);
548549
$regionNormalized = strtolower($rowData[self::COLUMN_REGION]);

dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Import/_files/address_import_update.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
"admin","[email protected]",1,,,"US",,"Katy","Parker","T.",19107,,,,"1079 Rocky Road",,"215-629-9720",,,,,,,1
33
"admin","[email protected]",3,"Phoenix",,"US",,"Brad","Brown","H.",85034,,"Arizona",4,"4225 Martha Street",,"928-707-1577",,,,,,1,
44
"admin","[email protected]",,"Tallahassee",,"US",,"William ","Compton","M.",32301,,"Florida",18,"1973 Drainer Avenue",,"850-590-7403",,,,,,,
5+
"admin","[email protected]",,"Tallahassee",,"UA",,"An ","Compton","M.",32301,,,18,"1973 Drainer Avenue",,"850-590-7403",,,,,,,

0 commit comments

Comments
 (0)