diff options
Diffstat (limited to 'models/boards.js')
-rw-r--r-- | models/boards.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/models/boards.js b/models/boards.js index b5f8b01b..af7685ae 100644 --- a/models/boards.js +++ b/models/boards.js @@ -55,6 +55,8 @@ Boards.attachSchema( autoValue() { if (this.isInsert) { return new Date(); + } else if (this.isUpsert) { + return { $setOnInsert: new Date() }; } else { this.unset(); } |