From f4e7bfc28d9a45c6d6177ba6b9e5f6e030ad2081 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 31 Oct 2017 05:22:21 -0700 Subject: [PATCH] Null custom field if field exists but is empty --- app/Http/Controllers/Api/AssetsController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Api/AssetsController.php b/app/Http/Controllers/Api/AssetsController.php index e61361dcb7..1daa56e724 100644 --- a/app/Http/Controllers/Api/AssetsController.php +++ b/app/Http/Controllers/Api/AssetsController.php @@ -348,7 +348,7 @@ class AssetsController extends Controller $model = AssetModel::find($request->get('model_id')); if ($model->fieldset) { foreach ($model->fieldset->fields as $field) { - $asset->{$field->convertUnicodeDbSlug()} = e($request->input($field->convertUnicodeDbSlug())); + $asset->{$field->convertUnicodeDbSlug()} = e($request->input($field->convertUnicodeDbSlug(), null)); } }