From 0c3b8cb11453255bd23fb109518a4c547da61cb6 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 13 Nov 2024 18:22:46 +0000 Subject: [PATCH] Moved created by to create only Signed-off-by: snipe --- app/Importer/AssetModelImporter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Importer/AssetModelImporter.php b/app/Importer/AssetModelImporter.php index b3cc8671d1..7cfd8a530d 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()) {