diff options
author | Andrés Manelli <andresmanelli@gmail.com> | 2019-02-27 20:45:58 +0100 |
---|---|---|
committer | Andrés Manelli <andresmanelli@gmail.com> | 2019-02-27 21:50:08 +0100 |
commit | da21a2a410c9b905de89d66236748e0c8f5357ea (patch) | |
tree | 631efc1954e7be787576284ea55321dd7c424d97 /models/swimlanes.js | |
parent | 904b5bf0f5f6e36131bf2d081a5d08fef408ac81 (diff) | |
download | wekan-da21a2a410c9b905de89d66236748e0c8f5357ea.tar.gz wekan-da21a2a410c9b905de89d66236748e0c8f5357ea.tar.bz2 wekan-da21a2a410c9b905de89d66236748e0c8f5357ea.zip |
Standarize copy functions. Match labels by name
Diffstat (limited to 'models/swimlanes.js')
-rw-r--r-- | models/swimlanes.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/models/swimlanes.js b/models/swimlanes.js index a3427fc6..1b18ba5d 100644 --- a/models/swimlanes.js +++ b/models/swimlanes.js @@ -101,8 +101,10 @@ Swimlanes.allow({ }); Swimlanes.helpers({ - copy(oldBoardId) { + copy(boardId) { const oldId = this._id; + const oldBoardId = this.boardId; + this.boardId = boardId; delete this._id; const _id = Swimlanes.insert(this); @@ -118,8 +120,8 @@ Swimlanes.helpers({ Lists.find(query).forEach((list) => { list.type = 'list'; list.swimlaneId = oldId; - list.boardId = this.boardId; - list.copy(_id); + list.boardId = boardId; + list.copy(boardId, _id); }); }, |