diff --git a/src/upgrade.js b/src/upgrade.js index 0560bfd032..5f7140d31d 100644 --- a/src/upgrade.js +++ b/src/upgrade.js @@ -491,9 +491,11 @@ Upgrade.upgrade = function(callback) { var pid = post.pid, uid = user.uid; - db.setAdd('pid:' + pid + ':upvote', uid); - db.sortedSetAdd('uid:' + uid + ':upvote', post.timestamp, pid); - db.incrObjectField('post:' + pid, 'votes'); + if (post.uid !== uid) { + db.setAdd('pid:' + pid + ':upvote', uid); + db.sortedSetAdd('uid:' + uid + ':upvote', post.timestamp, pid); + db.incrObjectField('post:' + pid, 'votes'); + } next(); }