You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/03/01 12:20:32 UTC

[GitHub] [airflow] malthe commented on a change in pull request #9973: Improve compatibility with mssql

malthe commented on a change in pull request #9973:
URL: https://github.com/apache/airflow/pull/9973#discussion_r816719640



##########
File path: airflow/models/dag.py
##########
@@ -897,7 +898,9 @@ def get_num_active_runs(self, external_trigger=None, session=None):
         )
 
         if external_trigger is not None:
-            query = query.filter(DagRun.external_trigger == external_trigger)
+            query = query.filter(
+                DagRun.external_trigger == (expression.true() if external_trigger else expression.false())

Review comment:
       Why is this necessary? What is the type of `external_trigger` here to require this workaround?




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