Skip to content

Commit

Permalink
fix(permissiblevalue): serialization
Browse files Browse the repository at this point in the history
Serialization of `PermissibleValue(text='value')` should be `'value'`,
instead it is `PermissibleValue({"text": 'value'})`. This patch fixes
it.

Signed-off-by: Silvano Cirujano Cuesta <[email protected]>
  • Loading branch information
Silvanoc committed Oct 25, 2024
1 parent ad74966 commit 6174853
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions linkml_runtime/linkml_model/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -4014,6 +4014,9 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):

super().__post_init__(**kwargs)

def __repr__(self):
return repr(getattr(self, 'text'))


@dataclass(repr=False)
class UniqueKey(YAMLRoot):
Expand Down

0 comments on commit 6174853

Please sign in to comment.