diff --git a/InvenTree/plugin/builtin/barcodes/inventree_barcode.py b/InvenTree/plugin/builtin/barcodes/inventree_barcode.py index 330c2e8fca..5d1d016139 100644 --- a/InvenTree/plugin/builtin/barcodes/inventree_barcode.py +++ b/InvenTree/plugin/builtin/barcodes/inventree_barcode.py @@ -100,7 +100,8 @@ class InvenTreeInternalBarcodePlugin(BarcodeMixin, InvenTreePlugin): if label in barcode_dict: try: - instance = model.objects.get(pk=barcode_dict[label]) + pk = int(barcode_dict[label]) + instance = model.objects.get(pk=pk) return self.format_matched_response(label, model, instance) except (ValueError, model.DoesNotExist): pass