diff options
Diffstat (limited to 'models/integrations.js')
-rw-r--r-- | models/integrations.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/models/integrations.js b/models/integrations.js index 0b2e08c6..41334744 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(); } |