Merge pull request #4153 from strapi/fix/self-referencing-many-way

Fix manyWay relation with self content type.
This commit is contained in:
Alexandre BODIN 2019-10-01 12:49:24 +02:00 committed by GitHub
commit fdb8ea7102
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -177,7 +177,7 @@ function appReducer(state = initialState, action) {
return newAttribute;
});
if (target === modelName && nature !== 'oneWay') {
if (target === modelName && nature !== 'oneWay' && nature !== 'manyWay') {
newState = newState.updateIn([...basePath, 'attributes', key], () => {
const newAttribute = state
.get('temporaryAttributeRelation')