diff options
author | Justin Reynolds <justinr1234@gmail.com> | 2019-09-05 12:29:45 -0500 |
---|---|---|
committer | Justin Reynolds <justinr1234@gmail.com> | 2019-09-05 12:29:45 -0500 |
commit | 3b9f2ca7c2fffa230bb0c6d4254a88deb9fbb023 (patch) | |
tree | 356ab6f5693852464bdb975934c53f63445e6d5f /models/invitationCodes.js | |
parent | 2c78aab3dc91ee276bfb5e4717ada72dc84ca3b0 (diff) | |
download | wekan-3b9f2ca7c2fffa230bb0c6d4254a88deb9fbb023.tar.gz wekan-3b9f2ca7c2fffa230bb0c6d4254a88deb9fbb023.tar.bz2 wekan-3b9f2ca7c2fffa230bb0c6d4254a88deb9fbb023.zip |
Fixes #2596 incorrect date types for created & updated
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(); } |