Make groups non repeatable by default

This commit is contained in:
Alexandre Bodin 2019-07-25 17:06:02 +02:00
parent f757d4d952
commit f484b4d66e
2 changed files with 4 additions and 4 deletions

View File

@ -237,7 +237,7 @@ module.exports = function createQueryBuilder({ model, modelKey, strapi }) {
for (let key of groupKeys) { for (let key of groupKeys) {
const attr = model.attributes[key]; const attr = model.attributes[key];
const { group, required = false, repeatable = true } = attr; const { group, required = false, repeatable = false } = attr;
const groupModel = strapi.groups[group]; const groupModel = strapi.groups[group];
@ -294,7 +294,7 @@ module.exports = function createQueryBuilder({ model, modelKey, strapi }) {
if (!_.has(values, key)) continue; if (!_.has(values, key)) continue;
const attr = model.attributes[key]; const attr = model.attributes[key];
const { group, repeatable = true } = attr; const { group, repeatable = false } = attr;
const groupModel = strapi.groups[group]; const groupModel = strapi.groups[group];

View File

@ -38,7 +38,7 @@ module.exports = ({ model, modelKey, strapi }) => {
for (let key of groupKeys) { for (let key of groupKeys) {
const attr = model.attributes[key]; const attr = model.attributes[key];
const { group, required = false, repeatable = true } = attr; const { group, required = false, repeatable = false } = attr;
const groupModel = strapi.groups[group]; const groupModel = strapi.groups[group];
@ -89,7 +89,7 @@ module.exports = ({ model, modelKey, strapi }) => {
if (!_.has(values, key)) continue; if (!_.has(values, key)) continue;
const attr = model.attributes[key]; const attr = model.attributes[key];
const { group, repeatable = true } = attr; const { group, repeatable = false } = attr;
const groupModel = strapi.groups[group]; const groupModel = strapi.groups[group];
const groupValue = values[key]; const groupValue = values[key];