mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Implement fix
This commit is contained in:
parent
663b2fd844
commit
d67975cb62
|
@ -151,17 +151,17 @@ class AssetModelsController extends Controller
|
||||||
$model->notes = $request->input('notes');
|
$model->notes = $request->input('notes');
|
||||||
$model->requestable = $request->input('requestable', '0');
|
$model->requestable = $request->input('requestable', '0');
|
||||||
|
|
||||||
$this->removeCustomFieldsDefaultValues($model);
|
|
||||||
|
|
||||||
$model->fieldset_id = $request->input('fieldset_id');
|
$model->fieldset_id = $request->input('fieldset_id');
|
||||||
|
|
||||||
if ($this->shouldAddDefaultValues($request->input())) {
|
|
||||||
if (!$this->assignCustomFieldsDefaultValues($model, $request->input('default_values'))){
|
|
||||||
return redirect()->back()->withInput()->with('error', trans('admin/custom_fields/message.fieldset_default_value.error'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($model->save()) {
|
if ($model->save()) {
|
||||||
|
$this->removeCustomFieldsDefaultValues($model);
|
||||||
|
|
||||||
|
if ($this->shouldAddDefaultValues($request->input())) {
|
||||||
|
if (!$this->assignCustomFieldsDefaultValues($model, $request->input('default_values'))) {
|
||||||
|
return redirect()->back()->withInput()->with('error', trans('admin/custom_fields/message.fieldset_default_value.error'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($model->wasChanged('eol')) {
|
if ($model->wasChanged('eol')) {
|
||||||
if ($model->eol > 0) {
|
if ($model->eol > 0) {
|
||||||
$newEol = $model->eol;
|
$newEol = $model->eol;
|
||||||
|
|
Loading…
Reference in a new issue