Skip to content

Commit 4826364

Browse files
author
Eric Bohanon
committed
MAGETWO-65667: Error Importing Customer multiselect attribute
- Fix static failure
1 parent 7e1eb9d commit 4826364

File tree

1 file changed

+0
-6
lines changed
  • app/code/Magento/CustomerImportExport/Model/Import

1 file changed

+0
-6
lines changed

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -492,15 +492,13 @@ protected function _prepareDataForUpdate(array $rowData)
492492
{
493493
$email = strtolower($rowData[self::COLUMN_EMAIL]);
494494
$customerId = $this->_getCustomerId($email, $rowData[self::COLUMN_WEBSITE]);
495-
496495
// entity table data
497496
$entityRowNew = [];
498497
$entityRowUpdate = [];
499498
// attribute values
500499
$attributes = [];
501500
// customer default addresses
502501
$defaults = [];
503-
504502
$newAddress = true;
505503
// get address id
506504
if (isset(
@@ -520,7 +518,6 @@ protected function _prepareDataForUpdate(array $rowData)
520518
'parent_id' => $customerId,
521519
'updated_at' => (new \DateTime())->format(\Magento\Framework\Stdlib\DateTime::DATETIME_PHP_FORMAT),
522520
];
523-
524521
foreach ($this->_attributes as $attributeAlias => $attributeParams) {
525522
if (array_key_exists($attributeAlias, $rowData)) {
526523
if (!strlen($rowData[$attributeAlias])) {
@@ -554,15 +551,13 @@ protected function _prepareDataForUpdate(array $rowData)
554551
}
555552
}
556553
}
557-
558554
foreach (self::getDefaultAddressAttributeMapping() as $columnName => $attributeCode) {
559555
if (!empty($rowData[$columnName])) {
560556
/** @var $attribute \Magento\Eav\Model\Entity\Attribute\AbstractAttribute */
561557
$table = $this->_getCustomerEntity()->getResource()->getTable('customer_entity');
562558
$defaults[$table][$customerId][$attributeCode] = $addressId;
563559
}
564560
}
565-
566561
// let's try to find region ID
567562
$entityRow['region_id'] = null;
568563
if (!empty($rowData[self::COLUMN_REGION])) {
@@ -575,7 +570,6 @@ protected function _prepareDataForUpdate(array $rowData)
575570
$entityRow['region_id'] = $regionId;
576571
}
577572
}
578-
579573
if ($newAddress) {
580574
$entityRowNew = $entityRow;
581575
$entityRowNew['created_at'] =

0 commit comments

Comments
 (0)