Skip to content

Commit

Permalink
filter on forecast_uuid too (#100)
Browse files Browse the repository at this point in the history
* filter on forecast_uuid too

* fix

* format
  • Loading branch information
peterdudfield authored Nov 19, 2024
1 parent 84e25bc commit e3e60bb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion database-cleanup/database_cleanup/save.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ def save_forecast_and_values(
fs.mkdir(directory)

if site_uuids is not None:
stmt = sa.select(ForecastSQL.forecast_uuid).filter(ForecastSQL.site_uuid.in_(site_uuids))
stmt = (
sa.select(ForecastSQL.forecast_uuid)
.filter(ForecastSQL.site_uuid.in_(site_uuids))
.filter(ForecastSQL.forecast_uuid.in_(forecast_uuids))
)

forecast_uuids = session.scalars(stmt).all()

Expand Down

0 comments on commit e3e60bb

Please sign in to comment.