We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2be8f94 commit f8a4834Copy full SHA for f8a4834
nowcasting_datamodel/read/read.py
@@ -235,8 +235,9 @@ def get_all_gsp_ids_latest_forecast(
235
query = query.options(joinedload(ForecastSQL.location))
236
query = query.options(joinedload(ForecastSQL.model))
237
query = query.options(joinedload(ForecastSQL.input_data_last_updated))
238
- query = query.options(joinedload(ForecastSQL.forecast_values))
239
- query = query.options(joinedload(ForecastSQL.forecast_values_latest))
+ if not historic:
+ query = query.options(joinedload(ForecastSQL.forecast_values))
240
+ query = query.options(joinedload(ForecastSQL.forecast_values_latest))
241
242
query = query.order_by(LocationSQL.gsp_id, desc(ForecastSQL.created_utc))
243
0 commit comments