@@ -189,13 +189,18 @@ Respond ONLY with valid JSON in this exact format (no markdown, no explanations)
189189 settings . table_widgets = tableSettings . widgets
190190 . filter ( ( w ) => validColumnNames . includes ( w . field_name ) )
191191 . map ( ( widgetData ) => {
192+ const widgetType = this . mapWidgetType ( widgetData . widget_type ) ;
193+ if ( widgetType === WidgetTypeEnum . Foreign_key ) {
194+ return null ;
195+ }
192196 const widget = new TableWidgetEntity ( ) ;
193197 widget . field_name = widgetData . field_name ;
194- widget . widget_type = this . mapWidgetType ( widgetData . widget_type ) ;
198+ widget . widget_type = widgetType ;
195199 widget . name = widgetData . name ;
196200 widget . description = widgetData . description ;
197201 return widget ;
198- } ) ;
202+ } )
203+ . filter ( ( w ) : w is TableWidgetEntity => w !== null ) ;
199204
200205 return settings ;
201206 } ) ;
@@ -225,7 +230,6 @@ Respond ONLY with valid JSON in this exact format (no markdown, no explanations)
225230 [ 'Number' , WidgetTypeEnum . Number ] ,
226231 [ 'Select' , WidgetTypeEnum . Select ] ,
227232 [ 'UUID' , WidgetTypeEnum . UUID ] ,
228- [ 'Enum' , WidgetTypeEnum . Enum ] ,
229233 [ 'Foreign_key' , WidgetTypeEnum . Foreign_key ] ,
230234 [ 'File' , WidgetTypeEnum . File ] ,
231235 [ 'Image' , WidgetTypeEnum . Image ] ,
0 commit comments