prabhusneha commented on code in PR #49459:
URL: https://github.com/apache/airflow/pull/49459#discussion_r2059715466


##########
providers/fab/src/airflow/providers/fab/auth_manager/fab_auth_manager.py:
##########
@@ -638,6 +651,23 @@ def _get_user_permissions(user: User):
             return []
         return getattr(user, "perms") or []
 
+    def _get_root_dag_id(self, dag_id: str) -> str:
+        """
+        Return the root DAG id in case of sub DAG, return the DAG id otherwise.
+
+        :param dag_id: the DAG id
+
+        :meta private:
+        """
+        if not self.appbuilder:
+            raise AirflowException("AppBuilder is not initialized.")
+
+        if "." in dag_id and hasattr(DagModel, "root_dag_id"):
+            return self.appbuilder.get_session.scalar(
+                select(DagModel.dag_id, 
DagModel.root_dag_id).where(DagModel.dag_id == dag_id).limit(1)
+            )
+        return dag_id

Review Comment:
   Yes, unrelated. Give me a few mins, fixing it



-- 
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