mirror of
https://github.com/wekan/wekan.git
synced 2026-02-14 20:18:07 +01:00
Avoid exporting imported cards
This commit is contained in:
parent
724d26379c
commit
b2e175ba8c
1 changed files with 2 additions and 1 deletions
|
|
@ -45,6 +45,7 @@ class Exporter {
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
const byBoard = { boardId: this._boardId };
|
const byBoard = { boardId: this._boardId };
|
||||||
|
const byBoardNoImported = { boardId: this._boardId, importedId: null };
|
||||||
// we do not want to retrieve boardId in related elements
|
// we do not want to retrieve boardId in related elements
|
||||||
const noBoardId = { fields: { boardId: 0 } };
|
const noBoardId = { fields: { boardId: 0 } };
|
||||||
const result = {
|
const result = {
|
||||||
|
|
@ -52,7 +53,7 @@ class Exporter {
|
||||||
};
|
};
|
||||||
_.extend(result, Boards.findOne(this._boardId, { fields: { stars: 0 } }));
|
_.extend(result, Boards.findOne(this._boardId, { fields: { stars: 0 } }));
|
||||||
result.lists = Lists.find(byBoard, noBoardId).fetch();
|
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.swimlanes = Swimlanes.find(byBoard, noBoardId).fetch();
|
||||||
result.comments = CardComments.find(byBoard, noBoardId).fetch();
|
result.comments = CardComments.find(byBoard, noBoardId).fetch();
|
||||||
result.activities = Activities.find(byBoard, noBoardId).fetch();
|
result.activities = Activities.find(byBoard, noBoardId).fetch();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue