fix: Add check for 'set_event_manager' method in custom_component before calling it (#4668)

Add check for 'set_event_manager' method in custom_component before calling it
This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-11-18 11:02:04 -03:00 committed by GitHub
commit 9ec66cdb13
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -490,7 +490,8 @@ class Vertex:
)
else:
custom_component = self.custom_component
self.custom_component.set_event_manager(event_manager)
if hasattr(self.custom_component, "set_event_manager"):
self.custom_component.set_event_manager(event_manager)
custom_params = initialize.loading.get_params(self.params)
await self._build_results(