diff --git a/website/src/models/user.js b/website/src/models/user.js index 989af4a3eb..f01ffba265 100644 --- a/website/src/models/user.js +++ b/website/src/models/user.js @@ -533,7 +533,7 @@ schema.plugin(baseModel, { 'invitations', 'balance', 'backer', 'contributor'], private: ['auth.local.hashed_password', 'auth.local.salt'], toJSONTransform: function userToJSON (plainObj, originalDoc) { - plainObj.filters = {}; // TODO Not saved + // plainObj.filters = {}; TODO Not saved plainObj._tmp = originalDoc._tmp; // be sure to send down drop notifs TODO how to test? return plainObj; @@ -753,6 +753,7 @@ schema.methods.getTasks = function getUserTasks () { // Given user and an array of tasks, return an API compatible user + tasks obj schema.methods.addTasksToUser = function addTasksToUser (tasks) { let obj = this.toJSON(); + obj.filters = {}; obj.tags = obj.tags.map(tag => { return {