File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,26 @@ def get_feeds(self, columns: Column) -> list[Feed]:
107107
108108 return feeds
109109
110+ def process_rows (self , column : Column ) -> list [Feed ]:
111+ """Recursively walk a column's rows/columns/widgets and return any feed widgets.
112+
113+ This helper complements get_feeds where nested structures can contain rows
114+ that in turn contain more columns. It returns a flat list of Feed objects.
115+ """
116+ feeds : list [Feed ] = []
117+ # If this column contains nested rows, descend into them
118+ if getattr (column , "rows" , None ):
119+ for row in column .rows :
120+ for col in row .columns :
121+ feeds += self .process_rows (col )
122+
123+ # Collect feed widgets from this column
124+ for widget in getattr (column , "widgets" , []):
125+ if getattr (widget , "type" , None ) == "feed" :
126+ feeds .append (widget )
127+
128+ return feeds
129+
110130 def get_feed (self , feed_id : str ) -> Feed :
111131 if not self .feed_hash :
112132 feeds = []
You can’t perform that action at this time.
0 commit comments