Skip to content

Commit

Permalink
Merge pull request #4623 from asanchezr/backmerge_test_to_dev
Browse files Browse the repository at this point in the history
Backmerge test to dev
  • Loading branch information
asanchezr authored Jan 30, 2025
2 parents 8c26406 + e528f60 commit edcf711
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -205,5 +205,10 @@ describe('mapUtils tests', () => {
const cql = toCqlFilterValue({ PID: '12345678', PIN: '54321' }, { forceExactMatch: true });
expect(cql).toBe("PID = '12345678' AND PIN='54321'");
});

it('if property id is specified, exact search should always be used', () => {
const cql = toCqlFilterValue({ PROPERTY_ID: '1' });
expect(cql).toBe("PROPERTY_ID = '1'");
});
});
});
3 changes: 2 additions & 1 deletion source/frontend/src/hooks/layer-api/layerUtils.ts
Original file line number Diff line number Diff line change
@@ -28,7 +28,8 @@ export const toCqlFilterValue = (object: Record<string, string>, flags?: IWfsCql
} else if (
((key === 'PID' || key === 'PID_PADDED' || key === 'PID_NUMBER') &&
object[key]?.length === 9) ||
flags?.forceExactMatch
flags?.forceExactMatch ||
key === 'PROPERTY_ID'
) {
cql.push(`${key} = '${object[key]}'`);
} else {

0 comments on commit edcf711

Please sign in to comment.