challenges: allow members to override challenge.tasks.notes, and sycning

challenge won't update those notes.
This commit is contained in:
Tyler Renelle
2014-01-03 13:10:56 -07:00
parent 5e321b0205
commit abd300199a
2 changed files with 26 additions and 5 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ ChallengeSchema.methods.toJSON = function(){
function syncableAttrs(task) {
var t = (task.toObject) ? task.toObject() : task; // lodash doesn't seem to like _.omit on EmbeddedDocument
// only sync/compare important attrs
var omitAttrs = 'history tags completed streak'.split(' ');
var omitAttrs = 'history tags completed streak notes'.split(' ');
if (t.type != 'reward') omitAttrs.push('value');
return _.omit(t, omitAttrs);
}