Moved created by to create only

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-11-13 18:22:46 +00:00
parent b6dbb8879a
commit 0c3b8cb114

View file

@ -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()) {