Null custom field if field exists but is empty

This commit is contained in:
snipe 2017-10-31 05:22:21 -07:00
parent 0089f73686
commit f4e7bfc28d

View file

@ -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));
}
}