🐛 fix(custom_component.py): handle case when repr_value is a string in custom_repr method
This commit is contained in:
parent
47fe4481f3
commit
b25098e24b
1 changed files with 2 additions and 0 deletions
|
|
@ -24,6 +24,8 @@ class CustomComponent(Component, extra=Extra.allow):
|
|||
super().__init__(**data)
|
||||
|
||||
def custom_repr(self):
|
||||
if isinstance(self.repr_value, str):
|
||||
return self.repr_value
|
||||
return str(self.repr_value)
|
||||
|
||||
def build_config(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue