From 77b25f84b80f489da7220bd66ad54d3aae3c33c5 Mon Sep 17 00:00:00 2001 From: Jen Jones Arnesen Date: Fri, 5 Apr 2024 08:56:34 +0200 Subject: [PATCH] fix(geojson-import): only run validator when the use geometry option is selected (#2003) Fixes https://dhis2.atlassian.net/browse/DHIS2-17071 The code will check if the "Import as associated geometry" is checked. If so, then the validator for that will run. Otherwise, it will not run the validator --- src/components/Geometry/GeometryAttributePicker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Geometry/GeometryAttributePicker.js b/src/components/Geometry/GeometryAttributePicker.js index 595037aa9..9e508f51a 100644 --- a/src/components/Geometry/GeometryAttributePicker.js +++ b/src/components/Geometry/GeometryAttributePicker.js @@ -66,7 +66,7 @@ const GeometryAttributePicker = ({ selectedLabel={SELECTEDLABEL} dataTest={DATATEST} multiSelect={multiSelect} - validator={VALIDATOR} + validator={useAttribute ? VALIDATOR : Function.prototype} autoSelectFirst {...rest} />