john-bodley commented on a change in pull request #9284: Reduce dashboard 
bootstrap payload
URL: 
https://github.com/apache/incubator-superset/pull/9284#discussion_r391870590
 
 

 ##########
 File path: superset/views/core.py
 ##########
 @@ -1788,14 +1789,15 @@ def dashboard(self, dashboard_id):
         dash = qry.one_or_none()
         if not dash:
             abort(404)
-        datasources = set()
+
+        datasources = defaultdict(list)
         for slc in dash.slices:
             datasource = slc.datasource
             if datasource:
-                datasources.add(datasource)
+                datasources[datasource].append(slc)
 
         if config["ENABLE_ACCESS_REQUEST"]:
-            for datasource in datasources:
+            for datasource in datasources.keys():
 
 Review comment:
   Nit. Remove the `.keys()` as this is implicit when iterating over a 
dictionary.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to