Skip to content

Commit

Permalink
Adds ternary to set a quantity when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
inietov committed Jun 28, 2023
1 parent b4b84f9 commit 8496e64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Controllers/ViewAssetsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function getRequestItem(Request $request, $itemType, $itemId = null, $can

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'))) {
Expand Down

0 comments on commit 8496e64

Please sign in to comment.