Files
superset2/superset-frontend/plugins/plugin-chart-country-map/test/plugin/transformProps.test.ts
Superset Dev d9f04d6682 fix(plugin-chart-country-map): admin_level string/number coercion + lower row_limit default
Two user-visible bugs fixed:

1. **"No GeoJSON URL resolved" with admin_level + country set.** The
   SelectControl serializes admin_level as a string ('0' / '1' /
   'aggregated'), but transformProps was comparing against numbers
   (`adminLevel === 1`), so real-world charts silently fell through
   every branch and returned a null URL. Existing tests passed because
   they used number values directly. Normalize to string at the top
   of transformProps and compare against string constants; add two
   regression tests that pass the string form-data values reality
   actually sends.

2. **Default row_limit of 50000 exceeds many deployments' configured
   ROW_LIMIT ceiling, blocking Update Chart.** Choropleths key one row
   per region — even the densest country maps (France 101 departments,
   India 36 states, US 51 territories) are well under 10k rows.
   Override the shared default to 10000 via controlOverrides.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 17:51:14 -07:00

5.3 KiB