mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-23 11:43:47 -08:00
Fixed Undefined variable user in $backto if checked out to a non-user
Fixes [ch9194]
This commit is contained in:
parent
93bf541ce7
commit
fcbc7e4540
|
@ -93,7 +93,7 @@ class AssetCheckinController extends Controller
|
|||
$data['model_name'] = $asset->model->name;
|
||||
$data['model_number'] = $asset->model->model_number;
|
||||
|
||||
if ($backto=='user') {
|
||||
if (($user) && ($backto =='user')) {
|
||||
return redirect()->route("users.show", $user->id)->with('success', trans('admin/hardware/message.checkin.success'));
|
||||
}
|
||||
return redirect()->route("hardware.index")->with('success', trans('admin/hardware/message.checkin.success'));
|
||||
|
|
Loading…
Reference in a new issue