diff --git a/docs/changelog/v3.2.x.rst b/docs/changelog/v3.2.x.rst index 97eb927b0..fb89f2b92 100644 --- a/docs/changelog/v3.2.x.rst +++ b/docs/changelog/v3.2.x.rst @@ -13,6 +13,9 @@ Bug Fixes - Fix broken schedule backend 'f1timing' (failed to load 2023 season schedule after Qatar GP due to unexpected data) +- Fix: failing lap accuracy check for one driver caused laps of all drivers to + be marked as inaccurate (#464) + New Features ^^^^^^^^^^^^ diff --git a/fastf1/core.py b/fastf1/core.py index 4fec27455..faa6e37ee 100644 --- a/fastf1/core.py +++ b/fastf1/core.py @@ -1929,11 +1929,15 @@ def _check_lap_accuracy(self): prev_lap = lap if len(is_accurate) > 0: - self._laps.loc[self.laps['DriverNumber'] == drv, 'IsAccurate'] = is_accurate + self._laps.loc[ + self.laps['DriverNumber'] == drv, 'IsAccurate' + ] = is_accurate else: - _logger.warning("Failed to perform lap accuracy check - all " - "laps marked as inaccurate.") - self.laps['IsAccurate'] = False # default should be inaccurate + _logger.warning(f"Failed to perform lap accuracy check - all " + f"laps marked as inaccurate (driver {drv})") + self._laps.loc[ + self.laps['DriverNumber'] == drv, 'IsAccurate' + ] = False # default should be inaccurate # necessary to explicitly cast to bool self._laps[['IsAccurate']] \