summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorwackazong <alexander@wackazong.com>2020-05-08 18:55:37 +0200
committerGitHub <noreply@github.com>2020-05-08 18:55:37 +0200
commita797abaa36790b95b44c3e9b2b080041512604e6 (patch)
tree2afd33e1b2cc15133d8a7c75ce9dd0a8f74e7093 /models
parent533bc045d06269dba2f42cdfe61817a1b3407974 (diff)
downloadwekan-a797abaa36790b95b44c3e9b2b080041512604e6.tar.gz
wekan-a797abaa36790b95b44c3e9b2b080041512604e6.tar.bz2
wekan-a797abaa36790b95b44c3e9b2b080041512604e6.zip
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.
Diffstat (limited to 'models')
-rw-r--r--models/cards.js2
1 files changed, 1 insertions, 1 deletions
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({