mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 07:34:06 -08:00
Merge pull request #14362 from Godmartinz/labels-not-generating-properly
Fixes inconsistencies with generating labels
This commit is contained in:
commit
9a5c1b8126
|
@ -38,7 +38,7 @@ class Label implements View
|
|||
$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 @@ class Label implements View
|
|||
->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(
|
||||
|
|
Loading…
Reference in a new issue