You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "uranusjr (via GitHub)" <gi...@apache.org> on 2023/02/13 03:17:41 UTC

[GitHub] [airflow] uranusjr commented on a diff in pull request #29494: Fix circular imports when airflow starts

uranusjr commented on code in PR #29494:
URL: https://github.com/apache/airflow/pull/29494#discussion_r1103956801


##########
airflow/models/xcom.py:
##########
@@ -772,6 +772,8 @@ def _get_bound_query(self) -> Generator[Query, None, None]:
             yield self._query
             return
 
+        if Session is None:
+            raise

Review Comment:
   ```suggestion
           if getattr(setting, "Session", None) is None:
               raise RuntimeError("Session must be set before!")
   ```
   
   This matches the pattern elsewhere; if this is called before `settings` is configured, the `Session` variable may actually not exist at all (instead of being `None`).



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org