From d75dbf9982c86fbcdae1f8fa5821d46e80361a6c Mon Sep 17 00:00:00 2001 From: Chris Blanchard Date: Sat, 26 Sep 2015 17:02:32 +0100 Subject: [PATCH] Hack to save complex gather instance --- db/models/archivedGather.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/db/models/archivedGather.js b/db/models/archivedGather.js index 48100b0..d5feeac 100644 --- a/db/models/archivedGather.js +++ b/db/models/archivedGather.js @@ -19,8 +19,11 @@ archivedGatherSchema.static({ .exec(callback); }, archive: function (gather, callback) { + // Do not try to fix this + // failed attempts to fix this: 1 + let data = JSON.parse(JSON.stringify(gather.toJson())); this.create({ - gather: gather.toJson() + gather: data }, callback); } });