mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Early return if no asset is found
This commit is contained in:
parent
c0cbdb1fc4
commit
085a993340
|
@ -40,6 +40,10 @@ class Label implements View
|
||||||
$offset = $this->data->get('offset');
|
$offset = $this->data->get('offset');
|
||||||
$template = $this->data->get('template');
|
$template = $this->data->get('template');
|
||||||
|
|
||||||
|
if ($assets->isEmpty()){
|
||||||
|
return redirect()->back();
|
||||||
|
}
|
||||||
|
|
||||||
// If disabled, pass to legacy view
|
// If disabled, pass to legacy view
|
||||||
if ((!$settings->label2_enable) && (!$template)) {
|
if ((!$settings->label2_enable) && (!$template)) {
|
||||||
return view('hardware/labels')
|
return view('hardware/labels')
|
||||||
|
|
Loading…
Reference in a new issue