Search by code was searching for intergers which was returning no results. Now updated to search the database with code as a string.
Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
parent
be1ee0b285
commit
a793862aa2
@ -46,7 +46,7 @@ export async function findPisByCode(
|
|||||||
logger.debug(`pisServices.findPisByCode: Searching for PIS code: ${code}`);
|
logger.debug(`pisServices.findPisByCode: Searching for PIS code: ${code}`);
|
||||||
const cleanCode = clean.removeNonNumeric(code);
|
const cleanCode = clean.removeNonNumeric(code);
|
||||||
const query = {
|
const query = {
|
||||||
code: parseInt(cleanCode),
|
code: cleanCode,
|
||||||
};
|
};
|
||||||
const search = db.query("pis", query);
|
const search = db.query("pis", query);
|
||||||
return await search;
|
return await search;
|
||||||
|
Loading…
Reference in New Issue
Block a user