From 63296a87cb7b981e8960ff166dd22d6d5dd45d11 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Thu, 6 Jun 2013 13:26:59 +0200 Subject: [PATCH] Do not increment undefined mapview stat tags --- lib/cartodb/carto_data.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/cartodb/carto_data.js b/lib/cartodb/carto_data.js index 0a27639d..8b568c05 100644 --- a/lib/cartodb/carto_data.js +++ b/lib/cartodb/carto_data.js @@ -69,6 +69,7 @@ module.exports = function() { }, function incrementTag(err, val) { if ( err ) throw err; + if ( _.isUndefined(stat_tag) ) return 1; redisKey = _.template(that.tagged_mapview_key, {username: username, stat_tag: stat_tag}); that.redisCmd(me.user_metadata_db, 'ZINCRBY', [redisKey, 1, now], this); },