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