diff --git a/inventree_phomemo/phomemo_label.py b/inventree_phomemo/phomemo_label.py index 73133fe..8176aab 100644 --- a/inventree_phomemo/phomemo_label.py +++ b/inventree_phomemo/phomemo_label.py @@ -65,9 +65,9 @@ class PhomemoLabelPlugin(LabelPrintingMixin, SettingsMixin, InvenTreePlugin): 'name': tpart.name, 'description': tpart.description, 'pk': tpart.pk, - 'params': tpart.parameters_map(), - 'category': tpart.category.name, - 'category_path': tpart.category.pathstring, + 'params': tpart.parameters_map() if hasattr(tpart, 'parameters_map') else None, + 'category': tpart.category.name if hasattr(tpart, 'category') else None, + 'category_path': tpart.category.pathstring if hasattr(tpart, 'category') else None, 'barcode': barcode, 'type': kwargs['label_instance'].SUBDIR }