From b9883a8e244d21f7caf00a794371dbe6b2e4e2ad Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Tue, 31 May 2016 21:32:08 +0200 Subject: Remove duplicated logic The duplicated logic was nessessary because the before.insert hook was not called before validation, when inserting was initiated on the server. Using autoValues fixed this problem. --- models/users.js | 7 ------- 1 file changed, 7 deletions(-) (limited to 'models/users.js') diff --git a/models/users.js b/models/users.js index 5641ec9b..b56fd2ab 100644 --- a/models/users.js +++ b/models/users.js @@ -404,13 +404,6 @@ if (Meteor.isServer) { title, boardId, userId: ExampleBoard.userId, - - // XXX Not certain this is a bug, but we except these fields get - // inserted by the Lists.before.insert collection-hook. Since this - // hook is not called in this case, we have to dublicate the logic and - // set them here. - archived: false, - createdAt: new Date(), }; Lists.insert(list); -- cgit v1.2.3-1-g7c22