Skip to content

Commit

Permalink
HAI-1508 Exclude 'feature' field from API calls
Browse files Browse the repository at this point in the history
  • Loading branch information
umeetiusbaar committed Oct 30, 2023
1 parent be9c962 commit e66f1d8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/domain/hanke/edit/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ export const convertFormStateToHankeData = (hankeData: HankeDataFormState): Hank
return {
...hankeData,
[FORMFIELD.HANKEALUEET]: hankeData[FORMFIELD.HANKEALUEET]?.map((alue) => {
// eslint-disable-next-line
const { feature, ...hankeAlue } = alue; // exclude virtual field 'feature' from API call
return {
...alue,
...hankeAlue,
geometriat: {
featureCollection: formatFeaturesToHankeGeoJSON(alue.feature ? [alue.feature] : []),
},
Expand Down

0 comments on commit e66f1d8

Please sign in to comment.