diff --git a/lib/cartodb/models/analysis_mapconfig_adapter.js b/lib/cartodb/models/analysis_mapconfig_adapter.js index c0cb6b8f..27cacd1d 100644 --- a/lib/cartodb/models/analysis_mapconfig_adapter.js +++ b/lib/cartodb/models/analysis_mapconfig_adapter.js @@ -104,17 +104,7 @@ AnalysisMapConfigAdapter.prototype.getLayers = function(analysisConfiguration, r debug('mapconfig input', JSON.stringify(requestMapConfig, null, 4)); - var analysisToRemove = {}; - if (Array.isArray(requestMapConfig.analyses)) { - requestMapConfig = replaceSourceRootQueries(requestMapConfig, analysisToRemove); - requestMapConfig = appendFiltersToNodes(requestMapConfig, dataviewsFiltersBySourceId); - - if (Object.keys(dataviews).length === 0) { - requestMapConfig.analyses = requestMapConfig.analyses.filter(function(analysis, index) { - return !analysisToRemove.hasOwnProperty(index); - }); - } - } + requestMapConfig = appendFiltersToNodes(requestMapConfig, dataviewsFiltersBySourceId); if (!shouldAdaptLayers(requestMapConfig)) { debug('mapconfig output', JSON.stringify(requestMapConfig, null, 4));