mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Reset the item between rows of import to avoid stale data. (#4868)
This commit is contained in:
parent
a28fee1ff4
commit
6bf17e7d47
|
@ -22,6 +22,9 @@ class ItemImporter extends Importer
|
|||
|
||||
protected function handle($row)
|
||||
{
|
||||
// Need to reset this between iterations or we'll have stale data.
|
||||
$this->item = [];
|
||||
|
||||
$item_category = $this->findCsvMatch($row, "category");
|
||||
if ($this->shouldUpdateField($item_category)) {
|
||||
$this->item["category_id"] = $this->createOrFetchCategory($item_category);
|
||||
|
|
Loading…
Reference in a new issue