dstandish commented on code in PR #39825:
URL: https://github.com/apache/airflow/pull/39825#discussion_r1672330199


##########
airflow/models/baseoperator.py:
##########
@@ -1245,11 +1245,21 @@ def dag(self) -> DAG:  # type: ignore[override]
     @dag.setter
     def dag(self, dag: DAG | None):
         """Operators can be assigned to one DAG, one time. Repeat assignments 
to that same DAG are ok."""
-        from airflow.models.dag import DAG
-
         if dag is None:
             self._dag = None
             return
+
+        # if already set to elided, then just set and exit
+        if self._dag is ELIDED_DAG:

Review Comment:
   BTW, this sentinel is private so, not user-facing, so of less consequence



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