From 3b9f2ca7c2fffa230bb0c6d4254a88deb9fbb023 Mon Sep 17 00:00:00 2001 From: Justin Reynolds Date: Thu, 5 Sep 2019 12:29:45 -0500 Subject: Fixes #2596 incorrect date types for created & updated --- models/integrations.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'models/integrations.js') 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(); } -- cgit v1.2.3-1-g7c22