mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Error handling for when log ID has no match on asset accept
This commit is contained in:
parent
99a355145e
commit
d03b8c6528
|
@ -284,9 +284,10 @@ class ViewAssetsController extends Controller
|
||||||
public function getAcceptAsset($logID = null)
|
public function getAcceptAsset($logID = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!$findlog = Actionlog::where('id', $logID)->first()) {
|
$findlog = Actionlog::where('id', $logID)->first();
|
||||||
echo 'no record';
|
|
||||||
//return redirect()->to('account')->with('error', trans('admin/hardware/message.does_not_exist'));
|
if (!$findlog) {
|
||||||
|
return redirect()->to('account/view-assets')->with('error', 'No matching record.');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($findlog->accepted_id!='') {
|
if ($findlog->accepted_id!='') {
|
||||||
|
|
Loading…
Reference in a new issue