mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-07 07:49:36 +00:00
Do not use customer reference for digikey barcode creation info as it likely contains not the part number
Fixes #1285
This commit is contained in:
parent
dbe49b5f00
commit
3480dd146e
1 changed files with 3 additions and 3 deletions
|
|
@ -304,11 +304,11 @@ final readonly class BarcodeScanResultHandler
|
|||
return null;
|
||||
}
|
||||
|
||||
// Digi-Key: can use customerPartNumber or supplierPartNumber directly
|
||||
// Digi-Key: supplierPartNumber directly
|
||||
if ($vendor === 'digikey') {
|
||||
return [
|
||||
'providerKey' => 'digikey',
|
||||
'providerId' => $scanResult->customerPartNumber ?? $scanResult->supplierPartNumber,
|
||||
'providerId' => $scanResult->supplierPartNumber ?? throw new \RuntimeException('Digikey barcode does not contain required supplier part number'),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
@ -316,7 +316,7 @@ final readonly class BarcodeScanResultHandler
|
|||
if ($vendor === 'element14') {
|
||||
return [
|
||||
'providerKey' => 'element14',
|
||||
'providerId' => $scanResult->supplierPartNumber,
|
||||
'providerId' => $scanResult->supplierPartNumber ?? throw new \RuntimeException('Element14 barcode does not contain required supplier part number'),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue