From 2dbd1089f5f30889fbce67d788e6c974b0c95b37 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 25 Oct 2016 03:53:19 -0700 Subject: [PATCH] Use model number if model name is blank --- app/Console/Commands/ObjectImportCommand.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Console/Commands/ObjectImportCommand.php b/app/Console/Commands/ObjectImportCommand.php index bc0a023b25..0f8d3fd8fc 100644 --- a/app/Console/Commands/ObjectImportCommand.php +++ b/app/Console/Commands/ObjectImportCommand.php @@ -322,7 +322,9 @@ class ObjectImportCommand extends Command $asset_model_name = $this->array_smart_fetch($row, "model name"); $asset_modelno = $this->array_smart_fetch($row, "model number"); - if (empty($asset_model_name)) { + if ((empty($asset_model_name)) && (!empty($asset_modelno))) { + $asset_model_name = $asset_modelno; + } elseif ((empty($asset_model_name)) && (empty($asset_modelno))) { $asset_model_name ='Unknown'; } if (empty($asset_modelno)) {