From c4879de4b1374896127d02b1f1ab0f94c1f74d75 Mon Sep 17 00:00:00 2001 From: Marc Hartmayer Date: Mon, 25 May 2020 23:05:36 +0200 Subject: Fix Python API generation --- models/cards.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'models') 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); }, -- cgit v1.2.3-1-g7c22