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