You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var handler =UniqueBarcodeHandler((String barcode) {
InvenTreeAPI().linkBarcode({
model: pk.toString(),
"barcode": barcode,
}).then((bool result) {
showSnackIcon(
result ?L10().barcodeAssigned :L10().barcodeNotAssigned,
success: result
);
state.refresh(context);
});
});
scanBarcode(context, handler: handler);
This uses the /api/barcode/ endpoint which may in fact also return results due to the barcode being parsed and having an existing supplier item returned instead of the barcode actually being in use.
To reproduce: make sure a supplier item exists for a EIGP 114.2018 barcode (e.g. DigiKey/Mouser) then attempt to assign the barcode to a stock item.
Logic for assigning custom barcodes uses
UniqueBarcodeHandler
prior to actually linking the barcode to check whether a barcode is already in use.inventree-app/lib/barcode/barcode.dart
Lines 383 to 396 in 9745bcf
This uses the
/api/barcode/
endpoint which may in fact also return results due to the barcode being parsed and having an existing supplier item returned instead of the barcode actually being in use.To reproduce: make sure a supplier item exists for a EIGP 114.2018 barcode (e.g. DigiKey/Mouser) then attempt to assign the barcode to a stock item.
I think this bug might be the cause of inventree/InvenTree#7637
Additional information
App version: 0.17.0 (built from source + patched for #570)
Flutter: 3.24.5
The text was updated successfully, but these errors were encountered: