diff --git a/CHANGELOG.md b/CHANGELOG.md index 905c01c160979eec7279aef095cdc348def1fa4b..6969f647584c34742594b01228fbd17160aeb5e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 of a `Container`, removing all useful methods of the `Container` class. This has been fixed and using a `slice` such as `[:2]` now returns a new `Container`. +* [#120](https://gitlab.com/linkahead/linkahead-pylib/-/issues/120) Unwanted + subproperties in reference properties. ### Security ### diff --git a/src/linkahead/common/models.py b/src/linkahead/common/models.py index 6b3c6c23fd1035680524720c902e2cae478eabf3..87645de2d937a08bcd71913dc9e9bd763a2d17de 100644 --- a/src/linkahead/common/models.py +++ b/src/linkahead/common/models.py @@ -112,10 +112,8 @@ FIX = "FIX" ALL = "ALL" NONE = "NONE" if TYPE_CHECKING: - INHERITANCE = Literal["OBLIGATORY", - "SUGGESTED", "RECOMMENDED", "ALL", "NONE"] - IMPORTANCE = Literal["OBLIGATORY", - "RECOMMENDED", "SUGGESTED", "FIX", "NONE"] + INHERITANCE = Literal["OBLIGATORY", "SUGGESTED", "RECOMMENDED", "ALL", "NONE", "FIX"] + IMPORTANCE = Literal["OBLIGATORY", "RECOMMENDED", "SUGGESTED", "FIX", "NONE"] ROLE = Literal["Entity", "Record", "RecordType", "Property", "File"] SPECIAL_ATTRIBUTES = ["name", "role", "datatype", "description", @@ -2461,7 +2459,7 @@ class _Properties(list): if inheritance is not None: self._inheritance[property] = inheritance else: - self._inheritance[property] = "ALL" + self._inheritance[property] = "FIX" if property.id is not None: self._element_by_id[str(property.id)] = property