diff options
author | Lauri Ojansivu <x@xet7.org> | 2019-02-28 00:54:29 +0200 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2019-02-28 00:54:29 +0200 |
commit | eeb8d4b3de39658f1ed9927cc85a968a9b9fe8c4 (patch) | |
tree | f46123f64a068ee1d6ed6c2f05ac990abdc7a1a5 /models/lists.js | |
parent | 82a728df7111413e4a1b106f4cd18265da5f397b (diff) | |
parent | ad75c541cff2c27c441a0fb67d52c57180020594 (diff) | |
download | wekan-eeb8d4b3de39658f1ed9927cc85a968a9b9fe8c4.tar.gz wekan-eeb8d4b3de39658f1ed9927cc85a968a9b9fe8c4.tar.bz2 wekan-eeb8d4b3de39658f1ed9927cc85a968a9b9fe8c4.zip |
Merge branch 'edge' into meteor-1.8
Diffstat (limited to 'models/lists.js')
-rw-r--r-- | models/lists.js | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/models/lists.js b/models/lists.js index d76c961c..a8e597ee 100644 --- a/models/lists.js +++ b/models/lists.js @@ -137,12 +137,15 @@ Lists.allow({ }); Lists.helpers({ - copy(swimlaneId) { + copy(boardId, swimlaneId) { const oldId = this._id; const oldSwimlaneId = this.swimlaneId || null; + this.boardId = boardId; + this.swimlaneId = swimlaneId; + let _id = null; existingListWithSameName = Lists.findOne({ - boardId: this.boardId, + boardId, title: this.title, archived: false, }); @@ -160,11 +163,7 @@ Lists.helpers({ listId: oldId, archived: false, }).forEach((card) => { - card.type = 'cardType-card'; - card.listId = _id; - card.boardId = this.boardId; - card.swimlaneId = swimlaneId; - card.copy(); + card.copy(boardId, swimlaneId, _id); }); }, |