betodealmeida commented on a change in pull request #4726: [bugfix] convert metrics to numeric in dataframe URL: https://github.com/apache/incubator-superset/pull/4726#discussion_r178423858
########## File path: superset/viz.py ########## @@ -170,11 +170,21 @@ def get_df(self, query_obj=None): if self.datasource.offset: df[DTTM_ALIAS] += timedelta(hours=self.datasource.offset) df[DTTM_ALIAS] += self.time_shift + + self.df_metrics_to_num(df, query_obj.get('metrics') or []) Review comment: Nit: `{}.get` already takes a default value when the key is not present: ```python self.df_metrics_to_num(df, query_obj.get('metrics', [])) ``` ---------------------------------------------------------------- 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