Skip to content

Commit

Permalink
Fix culture mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
jdesboeufs committed May 7, 2019
1 parent 4768de1 commit 1676f01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/cultures.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ const {readCsv} = require('./csv')

async function getCulturesMap() {
const rows = await readCsv(join(__dirname, '..', 'table-cultures.csv'))
return rows.slice(1).reduce((acc, item) => {
return rows.reduce((acc, item) => {
acc[item['Code Nature de Culture']] = item['Libellé Nature de Culture']
return acc
}, {})
}

async function getCulturesSpecialesMap() {
const rows = await readCsv(join(__dirname, '..', 'table-cultures-speciales.csv'))
return rows.slice(1).reduce((acc, item) => {
return rows.reduce((acc, item) => {
acc[item['Code Nature Culture Spéciale']] = item['Libellé Nature Culture Spéciale']
return acc
}, {})
Expand Down

0 comments on commit 1676f01

Please sign in to comment.