From e926db76a0d785850b90858389cd8ae0742bbf99 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Mon, 4 Mar 2024 10:26:38 -0800 Subject: [PATCH] fixes inconsistencies with generating labels --- app/View/Label.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) 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(