summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2019-08-12 20:04:49 +0300
committerGitHub <noreply@github.com>2019-08-12 20:04:49 +0300
commit6d47c2e568e843212669e783a61b78fc63e030e2 (patch)
tree1eb7faa6aa4e535d545a0f0c7c37038cf2f5a0b6
parentb5f74162afc1293fc3442ac42ced822d3f083239 (diff)
parent851246a59b6e16fc6511f174e084a546147adeeb (diff)
downloadwekan-6d47c2e568e843212669e783a61b78fc63e030e2.tar.gz
wekan-6d47c2e568e843212669e783a61b78fc63e030e2.tar.bz2
wekan-6d47c2e568e843212669e783a61b78fc63e030e2.zip
Merge pull request #2610 from JimCircadian/custom-field-api-insert
Updated insert action for CustomFields API
-rw-r--r--models/customFields.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/models/customFields.js b/models/customFields.js
index a5eb8906..6b5697c1 100644
--- a/models/customFields.js
+++ b/models/customFields.js
@@ -302,6 +302,7 @@ if (Meteor.isServer) {
) {
Authentication.checkUserId(req.userId);
const paramBoardId = req.params.boardId;
+ const board = Boards.findOne({ _id: paramBoardId });
const id = CustomFields.direct.insert({
name: req.body.name,
type: req.body.type,
@@ -309,7 +310,7 @@ if (Meteor.isServer) {
showOnCard: req.body.showOnCard,
automaticallyOnCard: req.body.automaticallyOnCard,
showLabelOnMiniCard: req.body.showLabelOnMiniCard,
- boardIds: { $in: [paramBoardId] },
+ boardIds: [board._id],
});
const customField = CustomFields.findOne({