From e434b665d54a0b29acd53eb90443fc29ab75aeb2 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Mon, 9 Sep 2024 12:43:50 +0100 Subject: [PATCH] allowing retrofit energy assessments bucket to be a presignable bucket --- infrastructure/terraform/main.tf | 2 +- recommendations/Recommendations.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/infrastructure/terraform/main.tf b/infrastructure/terraform/main.tf index 972722bb..9c2b7d47 100644 --- a/infrastructure/terraform/main.tf +++ b/infrastructure/terraform/main.tf @@ -176,7 +176,7 @@ module "retrofit_hotwater_kwh_predictions" { } module "retrofit_energy_assessments" { - source = "./modules/s3" + source = "./modules/s3_presignable_bucket" bucketname = "retrofit-energy-assessments-${var.stage}" allowed_origins = var.allowed_origins } diff --git a/recommendations/Recommendations.py b/recommendations/Recommendations.py index ce8225a1..45498a8a 100644 --- a/recommendations/Recommendations.py +++ b/recommendations/Recommendations.py @@ -534,8 +534,8 @@ class Recommendations: property_phase_impact["carbon"], rec["co2_equivalent_savings"] ) - # Insert this information into the recommendation - if rec.get("survey", False): + # Insert this information into the recommendation. + if not rec.get("survey", False): rec["sap_points"] = property_phase_impact["sap"] rec["co2_equivalent_savings"] = property_phase_impact["carbon"]