mirror of
https://github.com/strapi/strapi.git
synced 2025-09-27 17:29:14 +00:00
This commit is contained in:
parent
11a128ead2
commit
196b0895f3
@ -158,7 +158,8 @@ module.exports = function createComponentBuilder() {
|
|||||||
this.unsetRelation(oldAttribute);
|
this.unsetRelation(oldAttribute);
|
||||||
}
|
}
|
||||||
|
|
||||||
newAttribute.autoPopulate = newAttribute.autoPopulate || oldAttribute.autoPopulate;
|
// keep extra options that were set manually on oldAttribute
|
||||||
|
_.defaults(newAttribute, oldAttribute);
|
||||||
|
|
||||||
return this.setRelation({
|
return this.setRelation({
|
||||||
key,
|
key,
|
||||||
|
@ -115,8 +115,8 @@ function createSchemaBuilder({ components, contentTypes }) {
|
|||||||
targetAttribute,
|
targetAttribute,
|
||||||
columnName,
|
columnName,
|
||||||
dominant,
|
dominant,
|
||||||
autoPopulate,
|
|
||||||
private: isPrivate,
|
private: isPrivate,
|
||||||
|
...restOfOptions
|
||||||
} = attribute;
|
} = attribute;
|
||||||
|
|
||||||
const attr = {
|
const attr = {
|
||||||
@ -124,7 +124,7 @@ function createSchemaBuilder({ components, contentTypes }) {
|
|||||||
columnName: columnName || undefined,
|
columnName: columnName || undefined,
|
||||||
configurable: configurable === false ? false : undefined,
|
configurable: configurable === false ? false : undefined,
|
||||||
private: isPrivate === true ? true : undefined,
|
private: isPrivate === true ? true : undefined,
|
||||||
autoPopulate,
|
...restOfOptions,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!this.contentTypes.has(target)) {
|
if (!this.contentTypes.has(target)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user