You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Ash Berlin-Taylor (Jira)" <ji...@apache.org> on 2019/10/04 08:34:00 UTC

[jira] [Updated] (AIRFLOW-5490) security.py: Fix confusing == None comparison

     [ https://issues.apache.org/jira/browse/AIRFLOW-5490?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ash Berlin-Taylor updated AIRFLOW-5490:
---------------------------------------
    Summary: security.py: Fix confusing == None comparison  (was: security.py: Fix incorrect None comparison)

> security.py: Fix confusing == 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 {{col == None}}, which is confusing (it works, as SQLAlchemy handles this) but using {{is_(None)}} avoids this confusion.
> 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)