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
|
@ -39,6 +39,10 @@ class Label implements View
|
||||||
$assets = $this->data->get('assets');
|
$assets = $this->data->get('assets');
|
||||||
$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)) {
|
||||||
|
|
Loading…
Reference in a new issue