mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
[#1741] remove _id from TaskSchema (we're too deep in our legacy task.id
requirement, we can revisit later)
This commit is contained in:
@@ -39,11 +39,6 @@ ChallengeSchema.methods.toJSON = function(){
|
||||
var doc = this.toObject();
|
||||
doc.memberCount = doc.members ? _.size(doc.members) : doc.memberCount; // @see pre('save') comment above
|
||||
doc._isMember = this._isMember;
|
||||
_.each(['habits','dailys','todos','rewards'], function(type){
|
||||
_.each(doc[type],function(task){
|
||||
task.id = task.id || task._id;
|
||||
})
|
||||
})
|
||||
return doc;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user