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

Merge pull request #18113 from Godmartinz/customfieldvalue-in-importer-fix

Adds #17433  `is_null` check to import handler for custom fields
This commit is contained in:
snipe 2025-10-28 20:27:22 +00:00 committed by GitHub
commit c68f81db3c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -44,7 +44,7 @@ class AssetImporter extends ItemImporter
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));