mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
[hotfix] Table view doesn't allow SELECT (no group by) (#2274)
This commit is contained in:
parent
f9852bc807
commit
73393925c0
@ -254,6 +254,12 @@ const visTypes = {
|
||||
],
|
||||
},
|
||||
],
|
||||
controlOverrides: {
|
||||
metrics: {
|
||||
default: null,
|
||||
validators: null,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
markup: {
|
||||
|
@ -19,9 +19,11 @@ function tableVis(slice, payload) {
|
||||
const fd = slice.formData;
|
||||
// Removing metrics (aggregates) that are strings
|
||||
const realMetrics = [];
|
||||
for (const k in data.records[0]) {
|
||||
if (fd.metrics.indexOf(k) > -1 && !isNaN(data.records[0][k])) {
|
||||
realMetrics.push(k);
|
||||
if (fd.metrics) {
|
||||
for (const k in data.records[0]) {
|
||||
if (fd.metrics.indexOf(k) > -1 && !isNaN(data.records[0][k])) {
|
||||
realMetrics.push(k);
|
||||
}
|
||||
}
|
||||
}
|
||||
const metrics = realMetrics;
|
||||
|
Loading…
Reference in New Issue
Block a user