Skip to content

A free open source IT asset/license management system

Check for boolean on requestable

snipea34cb8b86298
diff --git a/app/Importer/AssetImporter.php b/app/Importer/AssetImporter.php
index d4b6665cb3..19e8d850dc 100644
--- a/app/Importer/AssetImporter.php
+++ b/app/Importer/AssetImporter.php
@@ -76,11 +76,11 @@ class AssetImporter extends ItemImporter
}
$this->item['notes'] = $this->findCsvMatch($row, 'asset_notes');
$this->item['image'] = $this->findCsvMatch($row, 'image');
- $this->item['requestable'] = $this->fetchHumanBoolean($this->findCsvMatch($row, 'requestable'));
- $asset->requestable = $this->fetchHumanBoolean($this->findCsvMatch($row, 'requestable'));
+ $this->item['requestable'] = ($this->fetchHumanBoolean($this->findCsvMatch($row, 'requestable')) == 1) ? '1' : 0;
+ $asset->requestable = $this->item['requestable'];
$this->item['warranty_months'] = intval($this->findCsvMatch($row, 'warranty_months'));
$this->item['model_id'] = $this->createOrFetchAssetModel($row);
- $this->item['byod'] =($this->fetchHumanBoolean($this->findCsvMatch($row, 'byod')) ==1 ) ? '1' : 0;
+ $this->item['byod'] = ($this->fetchHumanBoolean($this->findCsvMatch($row, 'byod')) == 1) ? '1' : 0;
// If no status ID is found