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 2019/06/05 16:43:40 UTC
[GitHub] [airflow] dstandish commented on a change in pull request #5372:
[AIRFLOW-3057] add prev_*_date_success to template context
dstandish commented on a change in pull request #5372: [AIRFLOW-3057] add prev_*_date_success to template context
URL: https://github.com/apache/airflow/pull/5372#discussion_r290833066
##########
File path: airflow/models/dagrun.py
##########
@@ -218,12 +218,16 @@ def get_dag(self):
return self.dag
@provide_session
- def get_previous_dagrun(self, session=None):
+ def get_previous_dagrun(self, session=None, state=None):
"""The previous DagRun, if there is one"""
-
- return session.query(DagRun).filter(
+ filters = [
Review comment:
We only filter on state if state is supplied.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services