Skip to content

fix: ensure lat/lon is converted back to a number after rounding

Iain Walmsley requested to merge EMC-44-point-poly-polished into develop

Noticed an issue in testing that .toFixed converts the rounded numbers to strings when dropping a pin causing the following error when you create a new record (didn't seem to affect editing existing records though);

Suppressed: uk.ac.ceh.gateway.catalogue.indexing.DocumentIndexingException: Failed to index 7e58dea9-c0dc-47d0-906b-9b45baaaa59b : Error from server at http://solr:8983/solr: ERROR: [doc=7e58dea9-c0dc-47d0-906b-9b45baaaa59b] Error adding field 'locations'='POINT("-1.06018" "53.04452")' msg=Unable to parse shape given formats "lat,lon", "x y" or as WKT because java.text.Pa rseException: Expected a number input: POINT("-1.06018" "53.04452")

This just ensures it's converted back to a number.

Merge request reports

Loading