From a34cb8b86298beff8a76ef9f6b2d3da8582ea6fa Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 6 Mar 2023 17:11:08 -0800 Subject: [PATCH] Check for boolean on requestable Signed-off-by: snipe --- app/Importer/AssetImporter.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Importer/AssetImporter.php b/app/Importer/AssetImporter.php index d4b6665cb..19e8d850d 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