diff --git a/src/pages/workspace/distanceRates/PolicyDistanceRatesSettingsPage.tsx b/src/pages/workspace/distanceRates/PolicyDistanceRatesSettingsPage.tsx index 2f1b9317e0a9..21370f90a415 100644 --- a/src/pages/workspace/distanceRates/PolicyDistanceRatesSettingsPage.tsx +++ b/src/pages/workspace/distanceRates/PolicyDistanceRatesSettingsPage.tsx @@ -56,7 +56,8 @@ function PolicyDistanceRatesSettingsPage({policy, policyCategories, route}: Poli const errorFields = customUnits[customUnitID]?.errorFields; const setNewUnit = (unit: UnitItemType) => { - DistanceRate.setPolicyDistanceRatesUnit(policyID, customUnit, {...customUnit, attributes: {unit: unit.value}}); + const attributes = {...customUnits[customUnitID].attributes, unit: unit.value}; + DistanceRate.setPolicyDistanceRatesUnit(policyID, customUnit, {...customUnit, attributes}); }; const setNewCategory = (category: ListItem) => {