Skip to content

Commit

Permalink
Merge pull request #2635 from bcgov/chore/compliance-summary-discrepancy
Browse files Browse the repository at this point in the history
chore: remove double counting of reporting-only emissions in compliance summary service
  • Loading branch information
dleard authored Dec 21, 2024
2 parents b6b165d + 5640ad8 commit af6d0a5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bc_obps/reporting/service/compliance_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@ def get_calculated_compliance_data(cls, report_version_id: int) -> ComplianceDat
) # ID=3 is Industrial Emissions category
production_totals = ComplianceService.get_report_product_aggregated_totals(report_version_id, rp.product_id)
allocated = ComplianceService.get_allocated_emissions_by_report_product_emission_category(
report_version_id, rp.product_id, list(EmissionCategory.objects.all().values_list('id', flat=True))
report_version_id,
rp.product_id,
list(EmissionCategory.objects.filter(category_type='basic').values_list('id', flat=True)),
)
allocated_reporting_only = ComplianceService.get_reporting_only_allocated(report_version_id, rp.product_id)
allocated_for_compliance = allocated - allocated_reporting_only
Expand Down

0 comments on commit af6d0a5

Please sign in to comment.