mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Merge pull request #13904 from snipe/fixes/redirect_to_consumable_on_invalid_category
Redirect back to the specific consumable for correction
This commit is contained in:
commit
c14b3d9780
|
@ -36,7 +36,7 @@ class ConsumableCheckoutController extends Controller
|
|||
|
||||
// Make sure there is a valid category
|
||||
if (!$consumable->category){
|
||||
return redirect()->route('consumables.index')->with('error', trans('general.invalid_item_category_single', ['type' => trans('general.consumable')]));
|
||||
return redirect()->route('consumables.edit', ['consumable' => $consumable->id])->with('error', trans('general.invalid_item_category_single', ['type' => trans('general.consumable')]));
|
||||
}
|
||||
|
||||
$this->authorize('checkout', $consumable);
|
||||
|
|
Loading…
Reference in a new issue