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

remove data from GRDF with no load

parent 07610687
No related branches found
No related tags found
1 merge request!20Update master branch
......@@ -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