mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-25 20:51:30 -08:00
Fixed assetmodels upload
This commit is contained in:
parent
53c46ac8de
commit
de21f00771
|
@ -85,7 +85,7 @@ class AssetModelsController extends Controller
|
|||
$model->fieldset_id = e($request->input('custom_fieldset'));
|
||||
}
|
||||
|
||||
$model = $request->handleImages($model,600, public_path().'/uploads/models');
|
||||
$model = $request->handleImages($model,600,null,null, public_path().'/uploads/models');
|
||||
|
||||
// Was it created?
|
||||
if ($model->save()) {
|
||||
|
@ -143,6 +143,8 @@ class AssetModelsController extends Controller
|
|||
return redirect()->route('models.index')->with('error', trans('admin/models/message.does_not_exist'));
|
||||
}
|
||||
|
||||
$model = $request->handleImages($model);
|
||||
|
||||
$model->depreciation_id = $request->input('depreciation_id');
|
||||
$model->eol = $request->input('eol');
|
||||
$model->name = $request->input('name');
|
||||
|
@ -152,6 +154,8 @@ class AssetModelsController extends Controller
|
|||
$model->notes = $request->input('notes');
|
||||
$model->requestable = $request->input('requestable', '0');
|
||||
|
||||
|
||||
|
||||
$this->removeCustomFieldsDefaultValues($model);
|
||||
|
||||
if ($request->input('custom_fieldset')=='') {
|
||||
|
@ -164,7 +168,6 @@ class AssetModelsController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
$model = $request->handleImages($model,600, public_path().'/uploads/models');
|
||||
|
||||
if ($model->save()) {
|
||||
return redirect()->route("models.index")->with('success', trans('admin/models/message.update.success'));
|
||||
|
|
Loading…
Reference in a new issue