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