1

Fixing more issues

This commit is contained in:
Alex Yatskov 2015-03-17 15:55:30 +09:00
parent 7ba02e6fdc
commit 076baa1204

View File

@ -257,13 +257,15 @@ function sanitizeQuery(query) {
_.each(keys, function(key) { _.each(keys, function(key) {
features[key] = _.has(query.features, key) ? query.features[key] : 0; features[key] = _.has(query.features, key) ? query.features[key] : 0;
}); });
query.features = features; query.features = features;
query.profile = _.reject( var profile = {};
query.profile, _.each(JSON.parse(query.profile), function(key, value) {
function(num) { return num === 0; } if (parseFloat(value) !== 0) {
); profile[key] = value;
}
});
query.profile = profile;
} }
function getCategories(callback) { function getCategories(callback) {