summaryrefslogtreecommitdiffstats
path: root/models/org.js
diff options
context:
space:
mode:
Diffstat (limited to 'models/org.js')
-rw-r--r--models/org.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/models/org.js b/models/org.js
index ce6f377e..a24d829d 100644
--- a/models/org.js
+++ b/models/org.js
@@ -98,6 +98,8 @@ Org.attachSchema(
autoValue() {
if (this.isInsert) {
return new Date();
+ } else if (this.isUpsert) {
+ return { $setOnInsert: new Date() };
} else {
this.unset();
}