🐛 (custom_component.py): fix an issue where the code was trying to access model_dump method on message object without checking if it is an instance of BaseModel class
This commit is contained in:
parent
88a8294d90
commit
5405809e90
1 changed files with 1 additions and 1 deletions
|
|
@ -489,7 +489,7 @@ class CustomComponent(BaseComponent):
|
|||
"""
|
||||
if name is None:
|
||||
name = self.display_name if self.display_name else self.__class__.__name__
|
||||
if hasattr(message, "model_dump"):
|
||||
if hasattr(message, "model_dump") and isinstance(message, BaseModel):
|
||||
message = message.model_dump()
|
||||
log = Log(message=message, type=get_artifact_type(message), name=name)
|
||||
self._logs.append(log)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue