diff --git a/src/midrc_react/core/jsdconfig.py b/src/midrc_react/core/jsdconfig.py index 11f4af1..37a04fe 100644 --- a/src/midrc_react/core/jsdconfig.py +++ b/src/midrc_react/core/jsdconfig.py @@ -68,7 +68,7 @@ class ConfigData(BaseModel): """ # Define fields based on expected YAML structure data_sources: DataSourceConfigList = Field(..., alias='data sources') - custom_age_ranges: Optional[Dict[str, List[Union[int, float]]]] = Field(None, alias='custom_age_range') + custom_age_ranges: Optional[Dict[str, List[List[Union[int, float]]]]] = Field(None, alias='custom age ranges') class Config: validate_by_name = True diff --git a/src/midrc_react/gui/pyside6/dataselectiongroupbox.py b/src/midrc_react/gui/pyside6/dataselectiongroupbox.py index 011027c..059ff16 100644 --- a/src/midrc_react/gui/pyside6/dataselectiongroupbox.py +++ b/src/midrc_react/gui/pyside6/dataselectiongroupbox.py @@ -123,6 +123,8 @@ def get_category_info(self): """ category_list = [self.category_combobox.itemText(i) for i in range(self.category_combobox.count())] category_index = self.category_combobox.currentIndex() + if category_index >=0 and category_index < len(category_list): + self.data.update_category_list(category_list, category_index) return self.data.category_info def add_file_combobox_to_layout(self, auto_populate: bool = True):