pateash commented on code in PR #24902:
URL: https://github.com/apache/airflow/pull/24902#discussion_r923409090


##########
airflow/models/dag.py:
##########
@@ -2120,6 +2120,13 @@ def filter_task_group(group, parent_group):
     def has_task(self, task_id: str):
         return task_id in self.task_dict
 
+    def has_task_group(self, task_group_id: str):
+        return task_group_id in self.task_group_dict
+
+    @property
+    def task_group_dict(self):
+        return {k: v for k, v in 
self._task_group.get_task_group_dict().items() if k is not None}

Review Comment:
   thanks @uranusjr, added **cached_property**
   
   I filtered root group as its not actually a 'TaskGroup' which we might look 
for and just to avoid any confusion as someone else might want to use it later.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to