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