summaryrefslogtreecommitdiffstats
path: root/models/export.js
diff options
context:
space:
mode:
authorAndrés Manelli <andresmanelli@gmail.com>2018-04-17 23:39:09 -0300
committerAndrés Manelli <andresmanelli@gmail.com>2018-08-11 00:07:29 +0200
commitb2e175ba8ceb644e7ddd0a4c74283f1cd0c1c8aa (patch)
tree767e7589cca5f77cd67767fcf541d0b0fd4b5493 /models/export.js
parent724d26379c33afc2c3d44d3722b0c5c35c1b80ed (diff)
downloadwekan-b2e175ba8ceb644e7ddd0a4c74283f1cd0c1c8aa.tar.gz
wekan-b2e175ba8ceb644e7ddd0a4c74283f1cd0c1c8aa.tar.bz2
wekan-b2e175ba8ceb644e7ddd0a4c74283f1cd0c1c8aa.zip
Avoid exporting imported cards
Diffstat (limited to 'models/export.js')
-rw-r--r--models/export.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/models/export.js b/models/export.js
index 8c4c29d4..8d4f5448 100644
--- a/models/export.js
+++ b/models/export.js
@@ -45,6 +45,7 @@ class Exporter {
build() {
const byBoard = { boardId: this._boardId };
+ const byBoardNoImported = { boardId: this._boardId, importedId: null };
// we do not want to retrieve boardId in related elements
const noBoardId = { fields: { boardId: 0 } };
const result = {
@@ -52,7 +53,7 @@ class Exporter {
};
_.extend(result, Boards.findOne(this._boardId, { fields: { stars: 0 } }));
result.lists = Lists.find(byBoard, noBoardId).fetch();
- result.cards = Cards.find(byBoard, noBoardId).fetch();
+ result.cards = Cards.find(byBoardNoImported, noBoardId).fetch();
result.swimlanes = Swimlanes.find(byBoard, noBoardId).fetch();
result.comments = CardComments.find(byBoard, noBoardId).fetch();
result.activities = Activities.find(byBoard, noBoardId).fetch();