From a797abaa36790b95b44c3e9b2b080041512604e6 Mon Sep 17 00:00:00 2001 From: wackazong Date: Fri, 8 May 2020 18:55:37 +0200 Subject: Create card does not allow an empty member list When I create a card via the API I always have the authorId in members, even if I pass an empty string as member list. Workaround: I can empty the member list by passing an empty string in a PUT request. This pull request proposes to not add the authorId to the member list when creating a card and the member list is empty. --- models/cards.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/cards.js b/models/cards.js index 4197f7ab..a22cf70b 100644 --- a/models/cards.js +++ b/models/cards.js @@ -2156,7 +2156,7 @@ if (Meteor.isServer) { const check = Users.findOne({ _id: req.body.authorId, }); - const members = req.body.members || [req.body.authorId]; + const members = req.body.members; const assignees = req.body.assignees; if (typeof check !== 'undefined') { const id = Cards.direct.insert({ -- cgit v1.2.3-1-g7c22