Skip to content
Snippets Groups Projects
Commit fc6d30c0 authored by Guilhem CARRON's avatar Guilhem CARRON
Browse files

fix(analysis): Now displays the correct elec analysis for the first month of a year

parent c5e7e2b6
No related branches found
No related tags found
2 merge requests!530chore(release): 1.6.4,!516fix(analysis): Now displays the correct elec analysis for the first month of a year
......@@ -63,9 +63,10 @@ const ElecHalfHourMonthlyAnalysis: React.FC<ElecHalfHourMonthlyAnalysisProps> =
if (subscribed) {
if (activateHalfHourLoad) {
const emas = new EnedisMonthlyAnalysisDataService(client)
const aggegatedDate = analysisDate.minus({ month: 1 })
const data = await emas.getEnedisMonthlyAnalysisByDate(
analysisDate.year,
analysisDate.month - 1
aggegatedDate.year,
aggegatedDate.month
)
if (subscribed && data && data.length) {
const aggregatedData = emas.aggregateValuesToDataLoad(data[0])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment