Adds ternary to set a quantity when needed

This commit is contained in:
Ivan Nieto Vivanco 2023-06-27 18:37:22 -06:00
parent b4b84f91d0
commit 8496e64e16

View file

@ -121,7 +121,7 @@ class ViewAssetsController extends Controller
if (($item_request = $item->isRequestedBy($user)) || $cancel_by_admin) {
$item->cancelRequest($requestingUser);
$data['item_quantity'] = $item_request->qty;
$data['item_quantity'] = ($item_request) ? $item_request->qty : 1;
$logaction->logaction('request_canceled');
if (($settings->alert_email != '') && ($settings->alerts_enabled == '1') && (! config('app.lock_passwords'))) {