mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Ensure that the native barcode scan plugin is *always* in use
This commit is contained in:
parent
776138f2e2
commit
0f48ca6008
@ -12,6 +12,7 @@ from rest_framework.views import APIView
|
||||
from stock.models import StockItem
|
||||
from stock.serializers import StockItemSerializer
|
||||
|
||||
from barcodes.plugins.inventree_barcode import InvenTreeBarcodePlugin
|
||||
from barcodes.barcode import hash_barcode
|
||||
from plugin import registry
|
||||
|
||||
@ -57,6 +58,9 @@ class BarcodeScan(APIView):
|
||||
|
||||
barcode_data = data.get('barcode')
|
||||
|
||||
# Ensure that the default barcode handler is installed
|
||||
plugins.append(InvenTreeBarcodePlugin())
|
||||
|
||||
# Look for a barcode plugin which knows how to deal with this barcode
|
||||
plugin = None
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user