diff --git a/inventree_wireviz/version.py b/inventree_wireviz/version.py index 884c74c..f9eab6d 100644 --- a/inventree_wireviz/version.py +++ b/inventree_wireviz/version.py @@ -1,3 +1,3 @@ """Version information for the inventree-wireviz plugin""" -PLUGIN_VERSION = "0.3.0" +PLUGIN_VERSION = "0.3.1" diff --git a/inventree_wireviz/wireviz.py b/inventree_wireviz/wireviz.py index f12feaa..be8e7c4 100644 --- a/inventree_wireviz/wireviz.py +++ b/inventree_wireviz/wireviz.py @@ -526,6 +526,11 @@ def convert_quantity(self, quantity, unit, base_unit): The converted quantity, or the original quantity if conversion failed """ + # Ignore unit if quantity not given + # Will be specified in the part units anyway + if not unit: + return quantity + logger.debug(f"WirevizPlugin: Converting quantity {quantity} {unit} to {base_unit}") q = f"{quantity} {unit}"