superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grace...@apache.org
Subject [incubator-superset] branch master updated: Fixing issue with table viz for table with no metrics (#5205)
Date Fri, 15 Jun 2018 00:15:12 GMT
This is an automated email from the ASF dual-hosted git repository.

graceguo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new b60ac5f  Fixing issue with table viz for table with no metrics (#5205)
b60ac5f is described below

commit b60ac5f160e49a31e87e56c9ee163f57a16af948
Author: michellethomas <michelle.q.thomas@gmail.com>
AuthorDate: Thu Jun 14 17:15:00 2018 -0700

    Fixing issue with table viz for table with no metrics (#5205)
---
 superset/assets/src/visualizations/table.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/superset/assets/src/visualizations/table.js b/superset/assets/src/visualizations/table.js
index 72a326a..a715d19 100644
--- a/superset/assets/src/visualizations/table.js
+++ b/superset/assets/src/visualizations/table.js
@@ -17,7 +17,7 @@ function tableVis(slice, payload) {
   const data = payload.data;
   const fd = slice.formData;
 
-  let metrics = fd.metrics.map(m => m.label || m);
+  let metrics = (fd.metrics || []).map(m => m.label || m);
   // Add percent metrics
   metrics = metrics.concat((fd.percent_metrics || []).map(m => '%' + m));
   // Removing metrics (aggregates) that are strings

-- 
To stop receiving notification emails like this one, please contact
graceguo@apache.org.

Mime
View raw message