From a6fd8fc4603bf590894315ee72ff76f7d2910e4c Mon Sep 17 00:00:00 2001 From: Aurelsicoko Date: Tue, 1 May 2018 14:36:17 +0200 Subject: [PATCH] Fixes #886 --- .../services/ContentTypeBuilder.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/strapi-plugin-content-type-builder/services/ContentTypeBuilder.js b/packages/strapi-plugin-content-type-builder/services/ContentTypeBuilder.js index da2d11eaee..43c82a6c53 100755 --- a/packages/strapi-plugin-content-type-builder/services/ContentTypeBuilder.js +++ b/packages/strapi-plugin-content-type-builder/services/ContentTypeBuilder.js @@ -215,8 +215,8 @@ module.exports = { attr.via = relation.key; attr.dominant = relation.dominant; - if (relation.pluginValue) { - attr.plugin = relation.pluginValue; + if (_.trim(relation.pluginValue)) { + attr.plugin = _.trim(relation.pluginValue); } attrs[attribute.name] = attr; @@ -366,7 +366,10 @@ module.exports = { attr.via = name; attr.columnName = params.targetColumnName; - attr.plugin = source; + + if (_.trim(source)) { + attr.plugin = _.trim(source); + } modelJSON.attributes[params.key] = attr;