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