You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/04/07 02:22:02 UTC

[GitHub] [superset] rusackas commented on a diff in pull request #19429: fix(dashboard): make to filter the correct certified or non-certified…

rusackas commented on code in PR #19429:
URL: https://github.com/apache/superset/pull/19429#discussion_r844577683


##########
superset/dashboards/filters.py:
##########
@@ -189,12 +189,14 @@ def apply(self, query: Query, value: Any) -> Query:
             return query.filter(
                 and_(
                     Dashboard.certified_by.isnot(None),
+                    Dashboard.certified_by != '',
                 )
             )
         if value is False:
             return query.filter(
-                and_(
+                or_(
                     Dashboard.certified_by.is_(None),
+                    Dashboard.certified_by == '',

Review Comment:
   ```suggestion
                       Dashboard.certified_by == "",
   ```
   These two changes should fix the `black` linting issues the PR is facing. 
   
   FWIW, I looked a the CI logs, which show the file failing linting. You can then run `black superset/dashboards/filters.py` to fix/commit these changes.



##########
superset/dashboards/filters.py:
##########
@@ -189,12 +189,14 @@ def apply(self, query: Query, value: Any) -> Query:
             return query.filter(
                 and_(
                     Dashboard.certified_by.isnot(None),
+                    Dashboard.certified_by != '',

Review Comment:
   ```suggestion
                       Dashboard.certified_by != "",
   ```



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org