ephraimbuddy commented on code in PR #23510:
URL: https://github.com/apache/airflow/pull/23510#discussion_r884237307


##########
airflow/models/dagbag.py:
##########
@@ -640,8 +640,10 @@ def _sync_perm_for_dag(self, dag, session: Session = None):
         from airflow.security.permissions import DAG_ACTIONS, 
resource_name_for_dag
         from airflow.www.fab_security.sqla.models import Action, Permission, 
Resource
 
+        root_dag_id = dag.parent_dag.dag_id if dag.parent_dag else None

Review Comment:
   I had to go look the documentation. From what I can see, a subdag can't have 
a subdag as the parent.
   cc: @ashb @kaxil 



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