Kaxil Naik created AIRFLOW-5940:
-----------------------------------

             Summary: Remove redundant Code in models.dagrun
                 Key: AIRFLOW-5940
                 URL: https://issues.apache.org/jira/browse/AIRFLOW-5940
             Project: Apache Airflow
          Issue Type: Improvement
          Components: core
    Affects Versions: 1.10.6, 2.0.0
            Reporter: Kaxil Naik
            Assignee: Kaxil Naik


The below code in models.dagrun contains redundant code

{code:python}
is_task_in_dag = task is not None
should_restore_task = is_task_in_dag and ti.state == State.REMOVED
{code}

It can be simplified by:

{code:python}
should_restore_task = (task is not None) and ti.state == State.REMOVED
{code}




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to