From 378903b4ac42680bf7f058afddfd4f089c061998 Mon Sep 17 00:00:00 2001 From: Amanda Eames Date: Tue, 21 Jan 2025 07:35:20 +1100 Subject: [PATCH] fix the query to allow for historical dates --- global-api/routes/ghgi_emission_forecast.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global-api/routes/ghgi_emission_forecast.py b/global-api/routes/ghgi_emission_forecast.py index 2ab74adba..d2be4caaf 100644 --- a/global-api/routes/ghgi_emission_forecast.py +++ b/global-api/routes/ghgi_emission_forecast.py @@ -13,7 +13,7 @@ def db_city_emission_forecast(actor_id, forecast_year, spatial_granularity): SELECT actor_id,cluster_id,cluster_name,cluster_description,gpc_sector,forecast_year,future_year,growth_rate FROM modelled.ghgi_emission_forecast WHERE actor_id = :actor_id - AND forecast_year = :forecast_year + AND future_year >= :forecast_year AND spatial_granularity = :spatial_granularity """ )