Skip to content

Node.js based forum software built for the modern web

convert score to int in mongo

Baris Soner Usaklid34e68ca25bb
diff --git a/src/database/mongo.js b/src/database/mongo.js
index af913ea9e1..a9cc09c2d4 100644
--- a/src/database/mongo.js
+++ b/src/database/mongo.js
@@ -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) {