Skip to content

Commit

Permalink
Merge pull request #51 from BaseAdresseNationale/antoineludeau/fix-ba…
Browse files Browse the repository at this point in the history
…l-parsing-for-cog-fields

Fix commune_insee and commune_deleguee_insee parsing transformation
  • Loading branch information
antoineludeau authored Oct 10, 2023
2 parents 6244d22 + 5361cae commit b50b5d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bal-converter/helpers/csv-bal-to-json-bal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const csvBalToJsonBal = (csv: string): Bal => {
switch (headerName) {
case "commune_insee":
case "commune_deleguee_insee":
return value.padStart(5, "0");
return value.trim() && value.padStart(5, "0");
case "numero":
return parseInt(value);
case "x":
Expand Down

0 comments on commit b50b5d9

Please sign in to comment.