Skip to content

Commit

Permalink
Fix ghg value computation
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeh committed Oct 17, 2023
1 parent a53e8f2 commit 3662234
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ export class ImpactCalculator {
const preProcessed: number = getPreprocessed(
INDICATOR_NAME_CODES.GHG_FARM,
);
return preProcessed * getLF();
return preProcessed * rawData.tonnage || 0;
},
[INDICATOR_NAME_CODES.WU]: () => {
return rawData[INDICATOR_NAME_CODES.WU] * tonnage || 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ describe('Impact Calculator Tests', () => {
[INDICATOR_NAME_CODES.NCE]: 0.4,
[INDICATOR_NAME_CODES.FLIL]: 0.3,
[INDICATOR_NAME_CODES.ENL]: 0.1,
[INDICATOR_NAME_CODES.GHG_FARM]: 0.2,
};

//ACT
Expand Down

0 comments on commit 3662234

Please sign in to comment.