diff options
author | Lauri Ojansivu <x@xet7.org> | 2020-05-26 00:13:00 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-26 00:13:00 +0300 |
commit | bb08e40ea54321b032eabf47eeadbff1dff1e2f9 (patch) | |
tree | d376fe5aeb9dadc1c4846dc9d80558df5b9796d7 /models/cards.js | |
parent | fd0afd7b055e31bdabb50c827dc5656baab15389 (diff) | |
parent | c4879de4b1374896127d02b1f1ab0f94c1f74d75 (diff) | |
download | wekan-bb08e40ea54321b032eabf47eeadbff1dff1e2f9.tar.gz wekan-bb08e40ea54321b032eabf47eeadbff1dff1e2f9.tar.bz2 wekan-bb08e40ea54321b032eabf47eeadbff1dff1e2f9.zip |
Merge pull request #3121 from marc1006/api_gen
Fix Python API generation
Diffstat (limited to 'models/cards.js')
-rw-r--r-- | models/cards.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/models/cards.js b/models/cards.js index 17279e1c..d5038580 100644 --- a/models/cards.js +++ b/models/cards.js @@ -1284,16 +1284,17 @@ Cards.mutations({ }, moveOptionalArgs({ boardId, swimlaneId, listId, sort } = {}) { - boardId = boardId ?? this.boardId; - swimlaneId = swimlaneId ?? this.swimlaneId; + boardId = boardId || this.boardId; + swimlaneId = swimlaneId || this.swimlaneId; // This should never happen, but there was a bug that was fixed in commit // ea0239538a68e225c867411a4f3e0d27c158383. if (!swimlaneId) { const board = Boards.findOne(boardId); swimlaneId = board.getDefaultSwimline()._id; } - listId = listId ?? this.listId; - sort = sort ?? this.sort; + listId = listId || this.listId; + if (sort === undefined || sort === null) + sort = this.sort; return this.move(boardId, swimlaneId, listId, sort); }, |