Skip to content

Commit

Permalink
feat(emission): add emission category 'Other, non-carbontaxed' & make…
Browse files Browse the repository at this point in the history
… sure it is not selected in init_application_emission_form_result.sql
  • Loading branch information
dleard committed May 11, 2020
1 parent c33e80d commit 145859b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion schema/data/prod/emission.sql
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ values
(5, 'BC_ScheduleB_FugitiveEmissions', 'Fugitive'),
(6, 'BC_ScheduleB_OnSiteTransportationEmissions', 'On-Site Transportation'),
(7, 'BC_ScheduleB_WasteEmissions', 'Waste'),
(8, 'BC_ScheduleB_WastewaterEmissions', 'Wastewater')
(8, 'BC_ScheduleB_WastewaterEmissions', 'Wastewater'),
(9, null, 'Other, non-carbon taxed')

on conflict(id) do update set swrs_emission_category=excluded.swrs_emission_category, display_name=excluded.display_name
returning 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ begin

first_source_type := true;
for emission_datum in (
select display_name from ggircs_portal.emission_category order by id
select display_name from ggircs_portal.emission_category where swrs_emission_category is not null order by id
)
loop
emission_category_var := emission_datum;
Expand Down Expand Up @@ -52,7 +52,9 @@ begin
g.gas_description,
g.gwp
from ggircs_portal.emission_category_gas ecg
inner join ggircs_portal.emission_category ec on ecg.emission_category_id = ec.id
inner join ggircs_portal.emission_category ec
on ecg.emission_category_id = ec.id
and ec.swrs_emission_category is not null
inner join ggircs_portal.gas g on ecg.gas_id = g.id
) as map
on (
Expand Down

0 comments on commit 145859b

Please sign in to comment.