[
https://issues.apache.org/jira/browse/AIRFLOW-5940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16976026#comment-16976026
]
ASF subversion and git services commented on AIRFLOW-5940:
----------------------------------------------------------
Commit 109789283dfda76649fafb7535fee82300e95d28 in airflow's branch
refs/heads/master from Kaxil Naik
[ https://gitbox.apache.org/repos/asf?p=airflow.git;h=1097892 ]
[AIRFLOW-5940] Remove redundant Code in models.dagrun (#6591)
> 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)