diff --git a/lib/cartodb/controllers/map.js b/lib/cartodb/controllers/map.js index ef080e24..5eb89b58 100644 --- a/lib/cartodb/controllers/map.js +++ b/lib/cartodb/controllers/map.js @@ -344,7 +344,9 @@ function createLayergroup (mapBackend, userLimitsApi, pgConnection, affectedTabl res.locals.mapConfig = mapConfig; res.locals.analysesResults = context.analysesResults; - mapBackend.createLayergroup(mapConfig, res.locals, mapConfigProvider, (err, layergroup) => { + const mapParams = { dbuser, dbname, dbpassword, dbhost, dbport }; + + mapBackend.createLayergroup(mapConfig, mapParams, mapConfigProvider, (err, layergroup) => { req.profiler.done('createLayergroup'); if (err) { return next(err);