summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Byrne <jambyr@bas.ac.uk>2019-08-12 17:47:04 +0100
committerJames Byrne <jambyr@bas.ac.uk>2019-08-12 17:47:04 +0100
commit851246a59b6e16fc6511f174e084a546147adeeb (patch)
treeb6ca9998b5661acae7cab9ab80ab560fa13d89e1
parentdb1cf5bb64f10317742361637d239f08bec141b8 (diff)
downloadwekan-851246a59b6e16fc6511f174e084a546147adeeb.tar.gz
wekan-851246a59b6e16fc6511f174e084a546147adeeb.tar.bz2
wekan-851246a59b6e16fc6511f174e084a546147adeeb.zip
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({