mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Refactor imported -> linked in models
This commit is contained in:
parent
bce2242528
commit
6adfcb3513
3 changed files with 102 additions and 102 deletions
|
|
@ -45,7 +45,7 @@ class Exporter {
|
|||
|
||||
build() {
|
||||
const byBoard = { boardId: this._boardId };
|
||||
const byBoardNoImported = { boardId: this._boardId, importedId: null };
|
||||
const byBoardNoLinked = { boardId: this._boardId, linkedId: null };
|
||||
// we do not want to retrieve boardId in related elements
|
||||
const noBoardId = { fields: { boardId: 0 } };
|
||||
const result = {
|
||||
|
|
@ -53,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(byBoardNoImported, noBoardId).fetch();
|
||||
result.cards = Cards.find(byBoardNoLinked, noBoardId).fetch();
|
||||
result.swimlanes = Swimlanes.find(byBoard, noBoardId).fetch();
|
||||
result.comments = CardComments.find(byBoard, noBoardId).fetch();
|
||||
result.activities = Activities.find(byBoard, noBoardId).fetch();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue