diff --git a/app/View/Label.php b/app/View/Label.php index fd6b17255035..cf695328012b 100644 --- a/app/View/Label.php +++ b/app/View/Label.php @@ -38,7 +38,7 @@ public function render(callable $callback = null) $settings = $this->data->get('settings'); $assets = $this->data->get('assets'); $offset = $this->data->get('offset'); - $template = $this->data->get('template'); + $template = LabelModel::find($settings->label2_template); // If disabled, pass to legacy view if ((!$settings->label2_enable) && (!$template)) { @@ -49,13 +49,6 @@ public function render(callable $callback = null) ->with('count', $this->data->get('count')); } - // If a specific template was set, use it, otherwise fall back to default - if (empty($template)) { - $template = LabelModel::find($settings->label2_template); - } elseif (is_string($template)) { - $template = LabelModel::find($template); - } - $template->validate(); $pdf = new TCPDF(