ashb commented on a change in pull request #16923:
URL: https://github.com/apache/airflow/pull/16923#discussion_r669433030



##########
File path: airflow/www/views.py
##########
@@ -1325,7 +1325,7 @@ def xcom(self, session=None):
         dm_db = models.DagModel
         ti_db = models.TaskInstance
         dag = session.query(dm_db).filter(dm_db.dag_id == dag_id).first()
-        ti = session.query(ti_db).filter(ti_db.dag_id == dag_id and 
ti_db.task_id == task_id).first()
+        ti = session.query(ti_db).filter(and_(ti_db.dag_id == dag_id, 
ti_db.task_id == task_id)).first()

Review comment:
       For future reference, this would also work:
   
   ```python
            ti = session.query(ti_db).filter(ti_db.dag_id == dag_id, 
ti_db.task_id == task_id).first()
   ```




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