From 6da108e0313ad76269922ea2b9afabfd2cd2e678 Mon Sep 17 00:00:00 2001 From: Oliver Date: Tue, 2 May 2023 23:09:41 +1000 Subject: [PATCH] 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 --- InvenTree/label/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/InvenTree/label/api.py b/InvenTree/label/api.py index 79d48e552f..578c37a896 100644 --- a/InvenTree/label/api.py +++ b/InvenTree/label/api.py @@ -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))