Skip to content

Commit d02dd50

Browse files
authored
Merge pull request #183 from MBARIMike/main
Guard against self.mission being None for "realtime" test.
2 parents dceb08d + 606dbe5 commit d02dd50

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/data/create_products.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,7 +1183,7 @@ def _get_gulper_locations(self, distnav: xr.DataArray) -> dict:
11831183
Returns:
11841184
Dictionary mapping bottle number to (distance_km, depth_m) tuple
11851185
"""
1186-
if "realtime" in self.mission:
1186+
if self.mission and "realtime" in self.mission:
11871187
return {}
11881188
gulper = Gulper()
11891189
gulper.args = argparse.Namespace()
@@ -1477,7 +1477,7 @@ def _plot_track_map( # noqa: PLR0915
14771477
end_time = pd.to_datetime(times[-1]).strftime("%Y-%m-%d %H:%M:%S UTC")
14781478

14791479
# Get title from netCDF attributes
1480-
if self._is_lrauv() and self.plot_name_stem and "realtime" in self.mission:
1480+
if self._is_lrauv() and self.plot_name_stem and self.mission and "realtime" in self.mission:
14811481
month_year = pd.to_datetime(times[0]).strftime("%B %Y")
14821482
title = f"Interpolated realtime SBD data for {self.auv_name} in {month_year}"
14831483
elif self._is_lrauv() and self.plot_name_stem:

0 commit comments

Comments
 (0)