Skip to content

Commit

Permalink
omit race_schedule conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
Lombardoc4 committed Dec 20, 2023
1 parent aa72579 commit df14659
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions fastf1/ergast/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,11 +438,8 @@ def _build_url(
) -> str:
selectors = list()

# ! Need to add endpoint if additional filters otherwise do not
# https://ergast.com/mrd/methods/schedule/
if season is not None:
selectors.append(f"/{season}")

if round is not None:
selectors.append(f"/{round}")
if grid_position is not None:
Expand Down Expand Up @@ -499,8 +496,8 @@ def _build_url(

# Special case for race_schedule
# If no additional filters besides required (season) exclude endpoint
if endpoint == 'races' and len(selectors) == 1:
endpoint = None
# if endpoint == 'races' and len(selectors) == 1:
# endpoint = None

if endpoint is not None:
selectors.append(f"/{endpoint}")
Expand Down

0 comments on commit df14659

Please sign in to comment.