Remove unnecessary logging statements in utils.js to streamline the filtering and parsing functions. This change enhances code clarity and performance by eliminating debug logs that are no longer needed.
All checks were successful
farmcontrol/farmcontrol-api/pipeline/head This commit looks good

This commit is contained in:
Tom Butcher 2026-08-09 22:28:05 +01:00
parent 2a30b7f3f6
commit 069406e4d8

View File

@ -680,7 +680,6 @@ async function resolveRefCondition(node, refModelEntry) {
async function resolveObjectRefFilter(filterProperty, expression, refName) { async function resolveObjectRefFilter(filterProperty, expression, refName) {
const refModelEntry = getRefModelEntryFromSchemaRef(refName); const refModelEntry = getRefModelEntryFromSchemaRef(refName);
logger.info('refModelEntry', refModelEntry, refName);
if (!refModelEntry?.model) return { [filterProperty]: { $in: [] } }; if (!refModelEntry?.model) return { [filterProperty]: { $in: [] } };
@ -715,9 +714,6 @@ async function parseFilter(property, value, model = null) {
if (fieldKind.kind === 'objectId' && property != '_id') { if (fieldKind.kind === 'objectId' && property != '_id') {
const refName = fieldKind.ref ?? getSchemaRefName(property, model); const refName = fieldKind.ref ?? getSchemaRefName(property, model);
logger.info('refName', refName);
logger.info('trimmed', trimmed);
logger.info('filterProperty', filterProperty);
return resolveObjectRefFilter(filterProperty, trimmed, refName); return resolveObjectRefFilter(filterProperty, trimmed, refName);
} }