diff --git a/app/Importer/AssetModelImporter.php b/app/Importer/AssetModelImporter.php index b3cc8671d..7cfd8a530 100644 --- a/app/Importer/AssetModelImporter.php +++ b/app/Importer/AssetModelImporter.php @@ -65,7 +65,6 @@ class AssetModelImporter extends ItemImporter $this->item['notes'] = trim($this->findCsvMatch($row, 'notes')); $this->item['fieldset'] = trim($this->findCsvMatch($row, 'fieldset')); $this->item['depreciation'] = trim($this->findCsvMatch($row, 'depreciation')); - $this->item['created_by'] = auth()->id(); $this->item['requestable'] = trim(($this->fetchHumanBoolean($this->findCsvMatch($row, 'requestable'))) == 1) ? 1 : 0; if (!empty($this->item['category'])) { @@ -101,6 +100,7 @@ class AssetModelImporter extends ItemImporter } else { Log::debug('Creating model'); $assetModel->fill($this->sanitizeItemForStoring($assetModel)); + $assetModel->created_by = auth()->id(); } if ($assetModel->save()) {