Skip to content

Commit e98426b

Browse files
Merge remote-tracking branch 'remotes/github/MAGETWO-97260' into EPAM-PR-34
2 parents bfecc27 + 894ca6b commit e98426b

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

app/code/Magento/Sales/Model/Order/Shipment.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -356,12 +356,11 @@ public function getTracksCollection()
356356
if ($this->tracksCollection === null) {
357357
$this->tracksCollection = $this->_trackCollectionFactory->create();
358358

359-
if ($this->getId()) {
360-
$this->tracksCollection->setShipmentFilter($this->getId());
359+
$id = $this->getId() ?: 0;
360+
$this->tracksCollection->setShipmentFilter($id);
361361

362-
foreach ($this->tracksCollection as $item) {
363-
$item->setShipment($this);
364-
}
362+
foreach ($this->tracksCollection as $item) {
363+
$item->setShipment($this);
365364
}
366365
}
367366

0 commit comments

Comments
 (0)