3
0
mirror of https://github.com/snipe/snipe-it.git synced 2025-10-30 03:42:35 +00:00

fix custom field value conditional check

This commit is contained in:
Godfrey M 2025-10-28 12:24:35 -07:00
parent c36236b7dc
commit e4f8c1ba3f

View File

@ -40,11 +40,11 @@ class AssetImporter extends ItemImporter
// ItemImporter handles the general fetching.
parent::handle($row);
if (!is_null($this->customFields)) {
if ($this->customFields) {
foreach ($this->customFields as $customField) {
$customFieldValue = $this->array_smart_custom_field_fetch($row, $customField);
if ($customFieldValue) {
if (!is_null($customFieldValue)) {
if ($customField->field_encrypted == 1) {
$this->item['custom_fields'][$customField->db_column_name()] = Crypt::encrypt($customFieldValue);
$this->log('Custom Field '.$customField->name.': '.Crypt::encrypt($customFieldValue));