[
https://issues.apache.org/jira/browse/AIRFLOW-5940?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jarek Potiuk resolved AIRFLOW-5940.
-----------------------------------
Fix Version/s: 2.0.0
Resolution: Resolved
> 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: 2.0.0, 1.10.6
> Reporter: Kaxil Naik
> Assignee: Kaxil Naik
> Priority: Trivial
> Fix For: 2.0.0
>
>
> 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)