Skip to content

Commit

Permalink
convert score to int in mongo
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed Mar 6, 2014
1 parent acd4771 commit d34e68c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/database/mongo.js
Original file line number Diff line number Diff line change
Expand Up @@ -544,8 +544,8 @@
value = value.toString();
}
var data = {
score:score,
value:value
score: parseInt(score, 10),
value: value
};

db.collection('objects').update({_key:key, value:value}, {$set:data}, {upsert:true, w: 1}, function(err, result) {
Expand Down

0 comments on commit d34e68c

Please sign in to comment.