mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-23 12:44:12 -08:00
If we survive form request validation but fail model validation, ensure that the errors are actually flashed to the session. Another thing that will be better fixed in the future when handling json nicer.
This commit is contained in:
parent
dd1241f964
commit
560115e758
|
@ -254,8 +254,8 @@ class AssetsController extends Controller
|
|||
\Session::flash('success', trans('admin/hardware/message.create.success'));
|
||||
return response()->json(['redirect_url' => route('hardware')]);
|
||||
}
|
||||
|
||||
return response()->json(['errors' => $asset->getErrors()]);
|
||||
\Session::flash('errors', $asset->getErrors());
|
||||
return response()->json(['errors' => $asset->getErrors()], 500);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue