From 606dbe59f448d3dbdc9e704bac8e28120e4c055c Mon Sep 17 00:00:00 2001 From: Mike McCann Date: Tue, 19 May 2026 08:51:36 -0700 Subject: [PATCH] Guard against self.mission being None for "realtime" test. --- src/data/create_products.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/create_products.py b/src/data/create_products.py index ef3096f..877b7c6 100755 --- a/src/data/create_products.py +++ b/src/data/create_products.py @@ -1183,7 +1183,7 @@ def _get_gulper_locations(self, distnav: xr.DataArray) -> dict: Returns: Dictionary mapping bottle number to (distance_km, depth_m) tuple """ - if "realtime" in self.mission: + if self.mission and "realtime" in self.mission: return {} gulper = Gulper() gulper.args = argparse.Namespace() @@ -1477,7 +1477,7 @@ def _plot_track_map( # noqa: PLR0915 end_time = pd.to_datetime(times[-1]).strftime("%Y-%m-%d %H:%M:%S UTC") # Get title from netCDF attributes - if self._is_lrauv() and self.plot_name_stem and "realtime" in self.mission: + if self._is_lrauv() and self.plot_name_stem and self.mission and "realtime" in self.mission: month_year = pd.to_datetime(times[0]).strftime("%B %Y") title = f"Interpolated realtime SBD data for {self.auv_name} in {month_year}" elif self._is_lrauv() and self.plot_name_stem: