summaryrefslogtreecommitdiffstats
path: root/models/integrations.js
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2019-09-05 21:01:51 +0300
committerLauri Ojansivu <x@xet7.org>2019-09-05 21:01:51 +0300
commit0f5226f81483dacdd996df9dbbef96cdee952be5 (patch)
tree40d160a33248cfcb4f524d6788f2a482bbdb5ca1 /models/integrations.js
parent7953e5a52aa1a923ee7de214fb5c403b3f8cb3ad (diff)
parent3b9f2ca7c2fffa230bb0c6d4254a88deb9fbb023 (diff)
downloadwekan-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/integrations.js')
-rw-r--r--models/integrations.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/models/integrations.js b/models/integrations.js
index ce843680..dbf53b8e 100644
--- a/models/integrations.js
+++ b/models/integrations.js
@@ -63,6 +63,8 @@ Integrations.attachSchema(
autoValue() {
if (this.isInsert) {
return new Date();
+ } else if (this.isUpsert) {
+ return { $setOnInsert: new Date() };
} else {
this.unset();
}