Commit 4d3e1a8d authored by Yoan VALLET's avatar Yoan VALLET
Browse files

remove data from GRDF with no load

parent 7e588a1b
......@@ -125,7 +125,12 @@ async function getData(token, idPCE) {
log('debug', 'Error from getData')
throw error
})
return rep
const filteredRep = rep.filter(function(el) {
return (
el.energie != null || el.volume_brut != null
)
})
return filteredRep
}
/**
......@@ -210,9 +215,7 @@ async function formateData(data) {
let load =
record.energie && record.energie !== 0
? record.energie
: record.volume_brut
? record.volume_brut * record.coeff_calcul.coeff_conversion
: 0
: record.volume_brut * record.coeff_calcul.coeff_conversion
return {
load: parseFloat(load),
year: parseInt(date.format('YYYY')),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment