diff options
author | Lauri Ojansivu <x@xet7.org> | 2019-09-05 21:01:51 +0300 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2019-09-05 21:01:51 +0300 |
commit | 0f5226f81483dacdd996df9dbbef96cdee952be5 (patch) | |
tree | 40d160a33248cfcb4f524d6788f2a482bbdb5ca1 /models/invitationCodes.js | |
parent | 7953e5a52aa1a923ee7de214fb5c403b3f8cb3ad (diff) | |
parent | 3b9f2ca7c2fffa230bb0c6d4254a88deb9fbb023 (diff) | |
download | wekan-0f5226f81483dacdd996df9dbbef96cdee952be5.tar.gz wekan-0f5226f81483dacdd996df9dbbef96cdee952be5.tar.bz2 wekan-0f5226f81483dacdd996df9dbbef96cdee952be5.zip |
Merge branch 'fix-date-stamps' of https://github.com/justinr1234/wekan into justinr1234-fix-date-stamps
Diffstat (limited to 'models/invitationCodes.js')
-rw-r--r-- | models/invitationCodes.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/models/invitationCodes.js b/models/invitationCodes.js index 75db5708..abb30f32 100644 --- a/models/invitationCodes.js +++ b/models/invitationCodes.js @@ -18,6 +18,8 @@ InvitationCodes.attachSchema( autoValue() { if (this.isInsert) { return new Date(); + } else if (this.isUpsert) { + return { $setOnInsert: new Date() }; } else { this.unset(); } |