diff --git a/app/Http/Controllers/AssetModelsController.php b/app/Http/Controllers/AssetModelsController.php index effaf5cea9..bd8e063df1 100755 --- a/app/Http/Controllers/AssetModelsController.php +++ b/app/Http/Controllers/AssetModelsController.php @@ -142,8 +142,6 @@ class AssetModelsController extends Controller $settings=Input::all(); $settings['eol']=0; - // - $model->name=e(Input::get('name')); $model->manufacturer_id = e(Input::get('manufacturer_id')); @@ -153,6 +151,12 @@ class AssetModelsController extends Controller $model->note = e(Input::get('note')); $model->eol=0; + if (Input::get('fieldset_id')=='') { + $model->fieldset_id = null; + } else { + $model->fieldset_id = e(Input::get('fieldset_id')); + } + if ($model->save()) { return JsonResponse::create($model); } else { diff --git a/resources/views/hardware/edit.blade.php b/resources/views/hardware/edit.blade.php index 515ed35661..ea7cafb20e 100755 --- a/resources/views/hardware/edit.blade.php +++ b/resources/views/hardware/edit.blade.php @@ -44,14 +44,14 @@