Skip to content

Commit 4e06e2d

Browse files
committed
fix: handle None variant in plot_frequencies_map_markers widget callback
1 parent 7a2bf42 commit 4e06e2d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

malariagen_data/anoph/frq_base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,11 +486,13 @@ def plot_frequencies_map_markers(
486486
self,
487487
m,
488488
ds: frq_params.ds_frequencies_advanced,
489-
variant: Union[int, str],
489+
variant: Optional[Union[int, str]],
490490
taxon: str,
491491
period: pd.Period,
492492
clear: bool = True,
493493
):
494+
if variant is None:
495+
return
494496
# Only import here because of some problems importing globally.
495497
import ipyleaflet # type: ignore
496498
import ipywidgets # type: ignore

0 commit comments

Comments
 (0)