Skip to content
Snippets Groups Projects
Commit 4d3e1a8d authored by Yoan VALLET's avatar Yoan VALLET
Browse files

remove data from GRDF with no load

parent 7e588a1b
No related branches found
No related tags found
No related merge requests found
......@@ -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')),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment