mistercrunch commented on a change in pull request #4469: Make access request 
redirect to dashboard if user already has access
URL: 
https://github.com/apache/incubator-superset/pull/4469#discussion_r170401673
 
 

 ##########
 File path: superset/views/core.py
 ##########
 @@ -842,6 +842,13 @@ def request_access(self):
                 .one()
             )
             datasources.add(datasource)
+
+        has_access = True
+        for datasource in datasources:
+            has_access &= (datasource and self.datasource_access(datasource))
 
 Review comment:
   I find the `all` and `any` functions much more readable than the `&=`, 
something like:
   `has_access = all((self.datasource_access(o) for o in datasources))`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to