Skip to content

Commit

Permalink
Merge pull request #14362 from Godmartinz/labels-not-generating-properly
Browse files Browse the repository at this point in the history
Fixes inconsistencies with generating labels
  • Loading branch information
snipe authored Mar 4, 2024
2 parents 9419c7f + e926db7 commit 9a5c1b8
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions app/View/Label.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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(
Expand Down

0 comments on commit 9a5c1b8

Please sign in to comment.