diff --git a/src/database.py b/src/database.py index 9581dfb..5f350ae 100644 --- a/src/database.py +++ b/src/database.py @@ -111,12 +111,11 @@ def get_forecasts_from_database( # get the latest forecast for all gsps. if historic: - if creation_utc_limit is not None: raise HTTPException( status_code=400, detail="creation_utc_limit is not supported for historic=True forecasts. " - "These forecast are continuously updated, compare to a forecast made a particular time." + "These forecast are continuously updated, compare to a forecast made a particular time.", ) start_datetime = get_start_datetime(start_datetime=start_datetime_utc) @@ -135,7 +134,6 @@ def get_forecasts_from_database( logger.debug(f"Found {len(forecasts)} forecasts from database") else: - # To speed up read time we only look at the last 12 hours of results, and take floor 30 mins if start_datetime_utc is None: start_datetime_utc = floor_30_minutes_dt( diff --git a/src/gsp.py b/src/gsp.py index 7d19a39..dc32a5d 100644 --- a/src/gsp.py +++ b/src/gsp.py @@ -95,7 +95,7 @@ def get_all_available_forecasts( end_datetime_utc=end_datetime_utc, compact=compact, gsp_ids=gsp_ids, - creation_utc_limit=creation_limit_utc + creation_utc_limit=creation_limit_utc, ) if not compact: