mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Adds ternary to set a quantity when needed
This commit is contained in:
parent
b4b84f91d0
commit
8496e64e16
|
@ -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'))) {
|
||||
|
|
Loading…
Reference in a new issue