diff --git a/lib/cartodb/backends/filter-stats.js b/lib/cartodb/backends/filter-stats.js index 7aa3adc7..de41da3f 100644 --- a/lib/cartodb/backends/filter-stats.js +++ b/lib/cartodb/backends/filter-stats.js @@ -26,17 +26,14 @@ FilterStatsBackends.prototype.getFilterStats = function (username, unfiltered_qu var stats = {}; var self = this; - function getUnfilteredRows() { - getEstimatedRows(self.pgQueryRunner, username, unfiltered_query, this); - }, - function receiveUnfilteredRows(err, rows) { + getEstimatedRows(self.pgQueryRunner, username, unfiltered_query, function (err, rows) { if (err){ callback(err); return; } stats.unfiltered_rows = rows; this(null, rows); - }, + }) function getFilteredRows() { if ( filters && !_.isEmpty(filters)) { var analysisFilter = new AnalysisFilter(filters);