Skip to content

Commit

Permalink
Avoid checking selected_obj before it's available
Browse files Browse the repository at this point in the history
  • Loading branch information
rosteen committed Jul 30, 2024
1 parent a126296 commit fc30f70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jdaviz/core/template_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2810,7 +2810,7 @@ class DatasetSpectralSubsetValidMixin(VuetifyTemplate, HubListener):

@observe("dataset_selected", "spectral_subset_selected")
def _check_dataset_spectral_subset_valid(self, event={}, return_ranges=False):
if not hasattr(self, 'dataset'):
if not hasattr(self, 'dataset') or self.dataset.selected_obj is None:
# plugin not fully initialized
return
if self.spectral_subset_selected == "Entire Spectrum":
Expand Down

0 comments on commit fc30f70

Please sign in to comment.