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 2018/05/07 21:09:06 UTC

[GitHub] hughhhh commented on a change in pull request #4914: [WiP] make MetricsControl the standard across visualizations

hughhhh commented on a change in pull request #4914: [WiP] make MetricsControl the standard across visualizations
URL: https://github.com/apache/incubator-superset/pull/4914#discussion_r186552155
 
 

 ##########
 File path: superset/viz.py
 ##########
 @@ -202,7 +222,7 @@ def query_obj(self):
         """Building a query object"""
         form_data = self.form_data
         gb = form_data.get('groupby') or []
-        metrics = form_data.get('metrics') or []
+        metrics = self.all_metrics or []
 
 Review comment:
   I don't like the pattern we currently have for returning empty arrays, i feel like we should be throwing some exceptions with the proper messaging to let the user know how that there are no metrics currently selected.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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