diff --git a/patient_data_fields.py b/patient_data_fields.py index 6b260e9..5a15cb7 100644 --- a/patient_data_fields.py +++ b/patient_data_fields.py @@ -266,10 +266,13 @@ def check_session_fields(self): return "Data recorder not set!" elif self.patient_vars[PatientDataVar.PRIM_DATA].get() == "": return "Data type not set!" - elif int(self.patient_vars[PatientDataVar.SESS_NUM].get()) < self.session_number and self.patient_vars[ - PatientDataVar.PRIM_DATA].get() == "Primary": - return "Session number already exists!" - else: + try: + if int(self.patient_vars[PatientDataVar.SESS_NUM].get()) < self.session_number and self.patient_vars[ + PatientDataVar.PRIM_DATA].get() == "Primary": + return "Session number already exists!" + else: + return False + except ValueError as e: return False def lock_session_fields(self): diff --git a/project_setup_ui.py b/project_setup_ui.py index c92a87a..7d6de36 100644 --- a/project_setup_ui.py +++ b/project_setup_ui.py @@ -474,6 +474,7 @@ def import_concern_ksf(self): print(f"WARNING: No tracker file selected") def populate_frequency_treeview(self): + self.clear_frequency_treeview() self.frequency_treeview_parents.append( self.frequency_key_treeview.insert("", 'end', str(0), text="Create New Frequency Key", tags=treeview_tags[2])) @@ -493,6 +494,7 @@ def clear_duration_treeview(self): self.duration_treeview_parents = [] def populate_duration_treeview(self): + self.clear_duration_treeview() self.duration_treeview_parents.append( self.duration_key_treeview.insert("", 'end', str(0), text="Create New Duration Key", tags=treeview_tags[2])) diff --git a/ui_params.py b/ui_params.py index 2fd3c9f..76e885f 100644 --- a/ui_params.py +++ b/ui_params.py @@ -1,4 +1,4 @@ -cometrics_version = "1.0.8" +cometrics_version = "1.0.9" ui_title = f"cometrics v{cometrics_version}" cometrics_data_root = fr'C:\cometrics'