mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-05-21 13:18:43 +00:00
challenges: but provide default notes
This commit is contained in:
parent
9a6f0c0339
commit
d9779d8e51
1 changed files with 1 additions and 0 deletions
|
|
@ -102,6 +102,7 @@ ChallengeSchema.methods.syncToUser = function(user, cb) {
|
|||
_.each(self.tasks, function(task){
|
||||
var list = user[task.type+'s'];
|
||||
var userTask = user.tasks[task.id] || (list.push(syncableAttrs(task)), list[list.length-1]);
|
||||
if (!userTask.notes) userTask.notes = task.notes; // don't override the notes, but provide it if not provided
|
||||
userTask.challenge = {id:self._id};
|
||||
userTask.tags = userTask.tags || {};
|
||||
userTask.tags[self._id] = true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue