Fix tests

This commit is contained in:
Alexandre Bodin 2019-07-22 17:39:36 +02:00
parent 128b26f1ee
commit e68f230baa
3 changed files with 1 additions and 34 deletions

View File

@ -306,18 +306,6 @@ module.exports = {
return ctx.badRequest(null, [{ messages: removeModelErrors }]);
}
const pluginStore = strapi.store({
environment: '',
type: 'plugin',
name: 'content-manager',
});
const schema = await pluginStore.get({ key: 'schema' });
delete schema.layout[model];
await pluginStore.set({ key: 'schema', value: schema });
ctx.send({ ok: true });
strapi.reload();

View File

@ -53,14 +53,6 @@ module.exports = {
? _.get(strapi.plugins, [source, 'models', name])
: _.get(strapi.models, name);
const pluginStore = strapi.store({
environment: '',
type: 'plugin',
name: 'content-manager',
});
const schema = await pluginStore.get({ key: 'schema' });
const attributes = [];
_.forEach(model.attributes, (params, attr) => {
const relation = _.find(model.associations, { alias: attr });
@ -90,17 +82,6 @@ module.exports = {
}
}
const appearance = _.get(schema, [
'layout',
name,
'attributes',
attr,
'appearance',
]);
if (appearance) {
_.set(params, ['appearance', appearance], true);
}
attributes.push({
name: attr,
params,

View File

@ -1,7 +1,5 @@
'use strict';
const _ = require('lodash');
const initMap = groups => {
const map = new Map();
@ -17,7 +15,7 @@ const initMap = groups => {
map.set(key, {
uid: key,
schema: {
name: _.upperFirst(name || key),
name: name || key,
connection,
collectionName,
description,