Merge pull request #7 from semiaddict/bug/immutable-fields
Do not export immutable fieldspull/23/head
commit
d0e02c6ead
|
@ -96,6 +96,9 @@ module.exports = {
|
||||||
const shouldExclude = strapi.plugins['config-sync'].config.exclude.includes(`${configPrefix}.${key}`);
|
const shouldExclude = strapi.plugins['config-sync'].config.exclude.includes(`${configPrefix}.${key}`);
|
||||||
if (shouldExclude) return;
|
if (shouldExclude) return;
|
||||||
|
|
||||||
|
// Do not export the _id field, as it is immutable
|
||||||
|
delete config._id;
|
||||||
|
|
||||||
configs[`${configPrefix}.${key}`] = { key, value: JSON.parse(value), ...config };
|
configs[`${configPrefix}.${key}`] = { key, value: JSON.parse(value), ...config };
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -121,6 +121,9 @@ module.exports = {
|
||||||
const shouldExclude = strapi.plugins['config-sync'].config.exclude.includes(`${configPrefix}.${config.type}`);
|
const shouldExclude = strapi.plugins['config-sync'].config.exclude.includes(`${configPrefix}.${config.type}`);
|
||||||
if (shouldExclude) return;
|
if (shouldExclude) return;
|
||||||
|
|
||||||
|
// Do not export the _id field, as it is immutable
|
||||||
|
delete config._id;
|
||||||
|
|
||||||
configs[`${configPrefix}.${config.type}`] = config;
|
configs[`${configPrefix}.${config.type}`] = config;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -90,6 +90,9 @@ module.exports = {
|
||||||
const shouldExclude = strapi.plugins['config-sync'].config.exclude.includes(`${configPrefix}.${config.id}`);
|
const shouldExclude = strapi.plugins['config-sync'].config.exclude.includes(`${configPrefix}.${config.id}`);
|
||||||
if (shouldExclude) return;
|
if (shouldExclude) return;
|
||||||
|
|
||||||
|
// Do not export the _id field, as it is immutable
|
||||||
|
delete config._id;
|
||||||
|
|
||||||
configs[`${configPrefix}.${config.id}`] = config;
|
configs[`${configPrefix}.${config.id}`] = config;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue