File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ def _get_study(id_: int | str, entity_type: str) -> BaseStudy:
9090 )
9191 result_dict = xmltodict .parse (xml_string , force_list = force_list_tags )["oml:study" ]
9292 study_id = int (result_dict ["oml:id" ])
93- alias = result_dict [ "oml:alias" ] if "oml:alias" in result_dict else None
93+ alias = result_dict . get ( "oml:alias" , None )
9494 main_entity_type = result_dict ["oml:main_entity_type" ]
9595
9696 if entity_type != main_entity_type :
@@ -99,9 +99,7 @@ def _get_study(id_: int | str, entity_type: str) -> BaseStudy:
9999 f", expected '{ entity_type } '"
100100 )
101101
102- benchmark_suite = (
103- result_dict ["oml:benchmark_suite" ] if "oml:benchmark_suite" in result_dict else None
104- )
102+ benchmark_suite = result_dict .get ("oml:benchmark_suite" , None )
105103 name = result_dict ["oml:name" ]
106104 description = result_dict ["oml:description" ]
107105 status = result_dict ["oml:status" ]
You can’t perform that action at this time.
0 commit comments