Skip to content

Commit

Permalink
ENGCOM-4553: Fix importFromArray by setting _isCollectionLoaded to tr…
Browse files Browse the repository at this point in the history
…ue after import #21869
  • Loading branch information
sivaschenko authored Apr 17, 2019
2 parents dad4dfb + 791204c commit 4d47daf
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ public function setEntity($entity)
$this->_entity = $this->_eavEntityFactory->create()->setType($entity);
} else {
throw new LocalizedException(
__('The "%1" entity supplied is invalid. Verify the entity and try again.', print_r($entity, 1))
__('The entity supplied to collection is invalid. Verify the entity and try again.')
);
}
return $this;
Expand Down Expand Up @@ -1061,6 +1061,7 @@ public function importFromArray($arr)
$this->_items[$entityId]->addData($row);
}
}
$this->_setIsLoaded();
return $this;
}

Expand Down Expand Up @@ -1164,7 +1165,6 @@ public function _loadEntities($printQuery = false, $logQuery = false)
* @param bool $printQuery
* @param bool $logQuery
* @return $this
* @throws LocalizedException
* @throws \Exception
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
* @SuppressWarnings(PHPMD.NPathComplexity)
Expand Down

0 comments on commit 4d47daf

Please sign in to comment.