Fix dimension metadata bug

This commit is contained in:
Javier Goizueta 2018-10-07 00:28:53 +02:00
parent 996d7fc90d
commit 10baf43ede

View File

@ -78,7 +78,7 @@ function _geometryType(ctx) {
} }
function _columns(ctx) { function _columns(ctx) {
if (ctx.metaOptions.columns || ctx.metaOptions.columnStats) { if (ctx.metaOptions.columns || ctx.metaOptions.columnStats || ctx.metaOptions.dimensions) {
// note: post-aggregation columns are in layer.options.columns when aggregation is present // note: post-aggregation columns are in layer.options.columns when aggregation is present
return queryUtils.queryPromise(ctx.dbConnection, _getSQL(ctx, sql => queryUtils.getQueryLimited(sql, 0))) return queryUtils.queryPromise(ctx.dbConnection, _getSQL(ctx, sql => queryUtils.getQueryLimited(sql, 0)))
.then(res => formatResultFields(ctx.dbConnection, res.fields)); .then(res => formatResultFields(ctx.dbConnection, res.fields));