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 2019/12/03 00:46:13 UTC

[GitHub] [incubator-superset] john-bodley commented on a change in pull request #8722: [fix] Remedying filter-box w/ invalid metrics

john-bodley commented on a change in pull request #8722: [fix] Remedying filter-box w/ invalid metrics
URL: https://github.com/apache/incubator-superset/pull/8722#discussion_r352935390
 
 

 ##########
 File path: superset/viz.py
 ##########
 @@ -1826,19 +1826,21 @@ def get_data(self, df):
             col = flt.get("column")
             metric = flt.get("metric")
             df = self.dataframes.get(col)
-            if metric:
-                df = df.sort_values(
-                    utils.get_metric_name(metric), ascending=flt.get("asc")
-                )
-                d[col] = [
-                    {"id": row[0], "text": row[0], "metric": row[1]}
-                    for row in df.itertuples(index=False)
-                ]
-            else:
-                df = df.sort_values(col, ascending=flt.get("asc"))
-                d[col] = [
-                    {"id": row[0], "text": row[0]} for row in df.itertuples(index=False)
-                ]
+            if df is not None:
+                if metric:
 
 Review comment:
   This is merely an indentation of lines 1829 - 1841.

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