mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 18:33:55 +00:00
Reorder model root attribute and remove multiple key
This commit is contained in:
parent
1c03f63465
commit
1618d3f858
@ -115,13 +115,13 @@ module.exports = {
|
||||
try {
|
||||
const modelJSON = _.cloneDeep(require(modelFilePath));
|
||||
|
||||
modelJSON.attributes = formatedAttributes;
|
||||
modelJSON.connection = connection;
|
||||
modelJSON.collectionName = collectionName;
|
||||
modelJSON.info = {
|
||||
name,
|
||||
description
|
||||
};
|
||||
modelJSON.connection = connection;
|
||||
modelJSON.collectionName = collectionName;
|
||||
modelJSON.attributes = formatedAttributes;
|
||||
|
||||
const clearRelationsErrors = Service.clearRelations(model, plugin);
|
||||
|
||||
|
||||
@ -177,7 +177,7 @@ module.exports = {
|
||||
|
||||
_.forEach(attributesConfigurable, attribute => {
|
||||
if (_.has(attribute, 'params.type')) {
|
||||
attrs[attribute.name] = attribute.params;
|
||||
attrs[attribute.name] = _.omit(attribute.params, 'multiple');
|
||||
|
||||
if (attribute.params.type === 'media') {
|
||||
const via = _.findKey(strapi.plugins.upload.models.file.attributes, {collection: '*'});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user