convert score to int in mongo

v1.18.x
Baris Soner Usakli 11 years ago
parent acd4771012
commit d34e68ca25

@ -544,8 +544,8 @@
value = value.toString(); value = value.toString();
} }
var data = { var data = {
score:score, score: parseInt(score, 10),
value:value value: value
}; };
db.collection('objects').update({_key:key, value:value}, {$set:data}, {upsert:true, w: 1}, function(err, result) { db.collection('objects').update({_key:key, value:value}, {$set:data}, {upsert:true, w: 1}, function(err, result) {

Loading…
Cancel
Save