mirror of
https://github.com/valitydev/redash.git
synced 2024-11-07 17:38:54 +00:00
Fix: string columns with dates failed to render.
This commit is contained in:
parent
6312f8738d
commit
30a89bfd2c
@ -12,6 +12,8 @@
|
|||||||
|
|
||||||
var columnTypes = {};
|
var columnTypes = {};
|
||||||
|
|
||||||
|
// TODO: we should stop manipulating incoming data, and switch to relaying on the column type set by the backend.
|
||||||
|
// This logic is prone to errors, and better be removed. Kept for now, for backward compatability.
|
||||||
_.each(this.query_result.data.rows, function (row) {
|
_.each(this.query_result.data.rows, function (row) {
|
||||||
_.each(row, function (v, k) {
|
_.each(row, function (v, k) {
|
||||||
if (angular.isNumber(v)) {
|
if (angular.isNumber(v)) {
|
||||||
@ -30,7 +32,7 @@
|
|||||||
|
|
||||||
_.each(this.query_result.data.columns, function(column) {
|
_.each(this.query_result.data.columns, function(column) {
|
||||||
if (columnTypes[column.name]) {
|
if (columnTypes[column.name]) {
|
||||||
if (column.type == null) {
|
if (column.type == null || column.type == 'string') {
|
||||||
column.type = columnTypes[column.name];
|
column.type = columnTypes[column.name];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user