Do not export immutable fields
parent
b28f34fd32
commit
ce7505532d
|
@ -96,6 +96,9 @@ module.exports = {
|
|||
const shouldExclude = strapi.plugins['config-sync'].config.exclude.includes(`${configPrefix}.${key}`);
|
||||
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 };
|
||||
});
|
||||
|
||||
|
|
|
@ -120,6 +120,9 @@ module.exports = {
|
|||
// Check if the config should be excluded.
|
||||
const shouldExclude = strapi.plugins['config-sync'].config.exclude.includes(`${configPrefix}.${config.type}`);
|
||||
if (shouldExclude) return;
|
||||
|
||||
// Do not export the _id field, as it is immutable
|
||||
delete config._id;
|
||||
|
||||
configs[`${configPrefix}.${config.type}`] = config;
|
||||
});
|
||||
|
|
|
@ -89,6 +89,9 @@ module.exports = {
|
|||
// Check if the config should be excluded.
|
||||
const shouldExclude = strapi.plugins['config-sync'].config.exclude.includes(`${configPrefix}.${config.id}`);
|
||||
if (shouldExclude) return;
|
||||
|
||||
// Do not export the _id field, as it is immutable
|
||||
delete config._id;
|
||||
|
||||
configs[`${configPrefix}.${config.id}`] = config;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue