3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-03-30 04:14:17 +00:00

Error handling for when log ID has no match on asset accept

This commit is contained in:
snipe
2017-11-07 22:25:24 -08:00
parent 99a355145e
commit d03b8c6528

View File

@ -284,9 +284,10 @@ class ViewAssetsController extends Controller
public function getAcceptAsset($logID = null)
{
if (!$findlog = Actionlog::where('id', $logID)->first()) {
echo 'no record';
//return redirect()->to('account')->with('error', trans('admin/hardware/message.does_not_exist'));
$findlog = Actionlog::where('id', $logID)->first();
if (!$findlog) {
return redirect()->to('account/view-assets')->with('error', 'No matching record.');
}
if ($findlog->accepted_id!='') {