Skip to content

Commit

Permalink
Merge pull request #456 from BaseAdresseNationale/antoineludeau/fix-g…
Browse files Browse the repository at this point in the history
…enerate-id-on-district-env-variable

Fixed generate district ID on assemblage only if activated
  • Loading branch information
antoineludeau authored Aug 1, 2024
2 parents ddd2bf1 + 3c0108d commit b3d5e9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/compose/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ async function composeCommune(codeCommune, ignoreIdConfig) {
if (isBAL) {
const balAddressVersion = getBalAddressVersion(balData.adresses[0])
districtID = digestIDsFromBalAddress(balData.adresses[0], balAddressVersion)?.districtID
} else {
} else if (IS_GENERATE_BANID_ON_ASSEMBLY) {
districtID = await getDistrictIDFromMainDB(codeCommune)
if (!districtID) {
throw new Error(`Aucun district ID trouvé pour la commune ${codeCommune}`)
Expand Down

0 comments on commit b3d5e9a

Please sign in to comment.