mirror of
https://github.com/inventree/InvenTree.git
synced 2026-10-05 09:55:28 +00:00
Fix error response in barcode API
This commit is contained in:
1 parent
0461661139
commit
5a978f07a5
1 file changed
+1
-1
@@ -83,7 +83,7 @@ class InvenTreeBarcodePlugin(BarcodePlugin):
|
|||||||
item = StockItem.objects.get(pk=pk)
|
item = StockItem.objects.get(pk=pk)
|
||||||
return item
|
return item
|
||||||
except (ValueError, StockItem.DoesNotExist): # pragma: no cover
|
except (ValueError, StockItem.DoesNotExist): # pragma: no cover
|
||||||
raise ValidationError({k, "Stock item does not exist"})
|
raise ValidationError({k: "Stock item does not exist"})
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user