Skip to content

Commit

Permalink
Fix: string columns with dates failed to render.
Browse files Browse the repository at this point in the history
  • Loading branch information
arikfr committed May 19, 2015
1 parent 6312f87 commit 30a89bf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rd_ui/app/scripts/services/resources.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

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(row, function (v, k) {
if (angular.isNumber(v)) {
Expand All @@ -30,7 +32,7 @@

_.each(this.query_result.data.columns, function(column) {
if (columnTypes[column.name]) {
if (column.type == null) {
if (column.type == null || column.type == 'string') {
column.type = columnTypes[column.name];
}
}
Expand Down

0 comments on commit 30a89bf

Please sign in to comment.