@@ -68,17 +68,11 @@ def get_input_model_from_fields(name: str, input_fields: list) -> Type['BaseMode
6868 field ['pattern' ] = "data:(.*);name=(.*);base64,(.*)"
6969
7070 if field_type == 'select' and 'options' in field and len (field ['options' ]) > 0 :
71- field ['enumNames' ] = [option ['label' ]
72- or '' for option in field ['options' ]]
73- field ['enum' ] = [option ['value' ]
74- or None for option in field ['options' ]]
7571 field ['widget' ] = 'select'
7672
7773 # For select fields, the datatype is the type of the first option
7874 datatype = type (field ['options' ][0 ]['value' ])
7975
80- field .pop ('options' , None )
81-
8276 fields [field ['name' ]] = (datatype , Field (
8377 ** {k : field [k ] for k in field }))
8478
@@ -109,15 +103,6 @@ def get_app_template_from_yaml(yaml_file: str) -> dict:
109103 input_model .schema ())
110104 page .pop ('input_fields' )
111105
112- app = yaml_dict .get ('app' , {})
113- input_fields = app .get ('input_fields' , [])
114- input_model = get_input_model_from_fields (
115- app ["name" ], input_fields )
116- app ['input_schema' ] = input_model .schema ()
117- app ['input_schema' ].pop ('title' )
118- app ['input_ui_schema' ] = get_ui_schema_from_json_schema (
119- input_model .schema ())
120-
121106 return AppTemplate (** yaml_dict )
122107
123108
0 commit comments