summaryrefslogtreecommitdiffstats
path: root/models/accountSettings.js
diff options
context:
space:
mode:
authorJustin Reynolds <justinr1234@gmail.com>2019-09-05 12:29:45 -0500
committerJustin Reynolds <justinr1234@gmail.com>2019-09-05 12:29:45 -0500
commit3b9f2ca7c2fffa230bb0c6d4254a88deb9fbb023 (patch)
tree356ab6f5693852464bdb975934c53f63445e6d5f /models/accountSettings.js
parent2c78aab3dc91ee276bfb5e4717ada72dc84ca3b0 (diff)
downloadwekan-3b9f2ca7c2fffa230bb0c6d4254a88deb9fbb023.tar.gz
wekan-3b9f2ca7c2fffa230bb0c6d4254a88deb9fbb023.tar.bz2
wekan-3b9f2ca7c2fffa230bb0c6d4254a88deb9fbb023.zip
Fixes #2596 incorrect date types for created & updated
Diffstat (limited to 'models/accountSettings.js')
-rw-r--r--models/accountSettings.js2
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();
}