Bug fix for label printing (#4751)

* Bug fix for label printing

- Do not use "debug mode" when printing using a plugin
- Fixes https://github.com/inventree/InvenTree/issues/4745

* Fix inverted logic
This commit is contained in:
Oliver 2023-05-02 23:09:41 +10:00 committed by GitHub
parent 3ff217d229
commit 6da108e031
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -211,7 +211,8 @@ class LabelPrintMixin(LabelFilterMixin):
label_names.append(label_name)
label_instances.append(label)
if debug_mode:
if debug_mode and plugin is None:
# Note that debug mode is only supported when not using a plugin
outputs.append(label.render_as_string(request))
else:
outputs.append(label.render(request))