From 709a4c7e4904c62f807599e8a6d432cf1823236b Mon Sep 17 00:00:00 2001 From: Kyle Conroy Date: Tue, 4 Oct 2022 13:18:51 -0400 Subject: [PATCH] subset plugin: fix IndexError when the selection is set to "Create New" and a subset is updated, there is no information that needs to be updated in the plugin --- jdaviz/configs/default/plugins/subset_plugin/subset_plugin.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jdaviz/configs/default/plugins/subset_plugin/subset_plugin.py b/jdaviz/configs/default/plugins/subset_plugin/subset_plugin.py index e4f01e4409..faf3fbaffe 100644 --- a/jdaviz/configs/default/plugins/subset_plugin/subset_plugin.py +++ b/jdaviz/configs/default/plugins/subset_plugin/subset_plugin.py @@ -71,6 +71,8 @@ def _sync_selected_from_state(self, *args): def _on_subset_update(self, *args): self._sync_selected_from_state(*args) + if self.subset_selected == 'Create New': + return self._get_subset_definition(*args) subset_to_update = self.session.edit_subset_mode.edit_subset[0] self.subset_select._update_subset(subset_to_update, attribute="type")