[
https://issues.apache.org/jira/browse/AIRFLOW-5490?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16941706#comment-16941706
]
ASF GitHub Bot commented on AIRFLOW-5490:
-----------------------------------------
ashb commented on pull request #6222: Revert "[AIRFLOW-5490] Fix incorrect None
comparison"
URL: https://github.com/apache/airflow/pull/6222
Reverts apache/airflow#6109 as this breaks the query.
```
In [5]: type(TI.state is None)
Out[5]: bool
In [6]: type(TI.state == None)
Out[6]: sqlalchemy.sql.elements.BinaryExpression
In [7]: type(TI.state.is_(None))
Out[7]: sqlalchemy.sql.elements.BinaryExpression
```
----------------------------------------------------------------
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:
[email protected]
> security.py: Fix incorrect None comparison
> ------------------------------------------
>
> Key: AIRFLOW-5490
> URL: https://issues.apache.org/jira/browse/AIRFLOW-5490
> Project: Apache Airflow
> Issue Type: Bug
> Components: security
> Affects Versions: 1.10.6
> Reporter: Jakob Homan
> Priority: Minor
> Labels: ccoss2019, newbie
>
> Note: This ticket's being created to facilitate a new contributor's workshop
> for Airflow. After the workshop has completed, I'll mark these all available
> for anyone that might like to take them on.
> In security.py, we twice use ``==`` with ``None``, which is [not
> correct|https://stackoverflow.com/a/3257957]
> airflow/www/security.py:343
> {code:python}
> sqla_models.PermissionView.permission == None, # noqa pylint:
> disable=singleton-comparison
> sqla_models.PermissionView.view_menu == None, # noqa pylint:
> disable=singleton-comparison
> )) {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)