Skip to content

Commit f24be5d

Browse files
author
Michael Logvin
committed
MAGETWO-37614: Stabilize story
1 parent f88a7c8 commit f24be5d

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

app/code/Magento/Customer/Model/Resource/Customer.php

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -202,21 +202,15 @@ protected function _saveAddresses(\Magento\Customer\Model\Customer $customer)
202202
}
203203
}
204204
}
205-
//@TODO: find appropriate place
206205
$changedAddresses = [];
207-
if ($defaultBillingId != $customer->getData('default_billing')) {
208-
$changedAddresses['default_billing'] = $customer->getData('default_billing');
209-
}
210-
if ($defaultShippingId != $customer->getData('default_shipping')) {
211-
$changedAddresses['default_shipping'] = $customer->getData('default_shipping');
212-
}
213-
if ($changedAddresses) {
214-
$this->_getWriteAdapter()->update(
215-
$this->getTable('customer_entity'),
216-
$changedAddresses,
217-
$this->_getWriteAdapter()->quoteInto('entity_id = ?', $customer->getId())
218-
);
219-
}
206+
207+
$changedAddresses['default_billing'] = $customer->getData('default_billing');
208+
$changedAddresses['default_shipping'] = $customer->getData('default_shipping');
209+
$this->_getWriteAdapter()->update(
210+
$this->getTable('customer_entity'),
211+
$changedAddresses,
212+
$this->_getWriteAdapter()->quoteInto('entity_id = ?', $customer->getId())
213+
);
220214

221215
return $this;
222216
}

0 commit comments

Comments
 (0)