validate/clean inverse relation name in promoted attr definition

This commit is contained in:
zadam
2021-10-27 22:13:54 +02:00
parent bcabe5786f
commit 79b8d91025
3 changed files with 10 additions and 3 deletions

View File

@@ -626,7 +626,9 @@ export default class AttributeDetailWidget extends NoteContextAwareWidget {
props.push('precision=' + this.$inputNumberPrecision.val());
}
} else if (this.attrType === 'relation-definition' && this.$inputInverseRelation.val().trim().length > 0) {
props.push("inverse=" + this.$inputInverseRelation.val());
const inverseRelationName = this.$inputInverseRelation.val();
props.push("inverse=" + utils.filterAttributeName(inverseRelationName));
}
this.$rowNumberPrecision.toggle(