Do not increment undefined mapview stat tags

This commit is contained in:
Sandro Santilli 2013-06-06 13:26:59 +02:00
parent b67a487c48
commit 63296a87cb

View File

@ -69,6 +69,7 @@ module.exports = function() {
}, },
function incrementTag(err, val) { function incrementTag(err, val) {
if ( err ) throw err; if ( err ) throw err;
if ( _.isUndefined(stat_tag) ) return 1;
redisKey = _.template(that.tagged_mapview_key, {username: username, stat_tag: stat_tag}); redisKey = _.template(that.tagged_mapview_key, {username: username, stat_tag: stat_tag});
that.redisCmd(me.user_metadata_db, 'ZINCRBY', [redisKey, 1, now], this); that.redisCmd(me.user_metadata_db, 'ZINCRBY', [redisKey, 1, now], this);
}, },