mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-02-28 20:39:35 +00:00
Fixed test errors
This commit is contained in:
parent
f22bff7adc
commit
e0345076c1
2 changed files with 4 additions and 4 deletions
|
|
@ -311,7 +311,7 @@ class ScanController extends AbstractController
|
||||||
$input = trim($request->request->getString('input', ''));
|
$input = trim($request->request->getString('input', ''));
|
||||||
|
|
||||||
// We cannot use getEnum here, because we get an empty string for mode, when auto mode is selected
|
// We cannot use getEnum here, because we get an empty string for mode, when auto mode is selected
|
||||||
$mode = $request->request->getString('mode', BarcodeSourceType::class, '');
|
$mode = $request->request->getString('mode', '');
|
||||||
if ($mode === '') {
|
if ($mode === '') {
|
||||||
$modeEnum = null;
|
$modeEnum = null;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -433,16 +433,16 @@ class PartRepository extends NamedDBElementRepository
|
||||||
$qb->select('part');
|
$qb->select('part');
|
||||||
|
|
||||||
if ($caseInsensitive) {
|
if ($caseInsensitive) {
|
||||||
$qb->where("LOWER(part.mpn) = LOWER(:mpn)");
|
$qb->where("LOWER(part.manufacturer_product_number) = LOWER(:mpn)");
|
||||||
} else {
|
} else {
|
||||||
$qb->where("part.mpn = :mpn");
|
$qb->where("part.manufacturer_product_number = :mpn");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($manufacturerName !== null) {
|
if ($manufacturerName !== null) {
|
||||||
$qb->leftJoin('part.manufacturer', 'manufacturer');
|
$qb->leftJoin('part.manufacturer', 'manufacturer');
|
||||||
|
|
||||||
if ($caseInsensitive) {
|
if ($caseInsensitive) {
|
||||||
$qb->andWhere("LOWER(part.manufacturer.name) = LOWER(:manufacturerName)");
|
$qb->andWhere("LOWER(manufacturer.name) = LOWER(:manufacturerName)");
|
||||||
} else {
|
} else {
|
||||||
$qb->andWhere("manufacturer.name = :manufacturerName");
|
$qb->andWhere("manufacturer.name = :manufacturerName");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue