langflow-ai / langflow

Langflow is a low-code app builder for RAG and multi-agent AI applications. It’s Python-based and agnostic to any model, API, or database.
http://www.langflow.org
MIT License
35.93k stars 4.25k forks source link

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

Closed ogabrielluiz closed 1 week ago

ogabrielluiz commented 1 week ago

Add attribute check before calling set_event_manager to avoid AttributeError in components inheriting from CustomComponent.

codspeed-hq[bot] commented 1 week ago

CodSpeed Performance Report

Merging #4668 will improve performances by 31.06%

Comparing 4662-sql-query-component-doesnt-work (2b4b4a7) with main (95779c8)

Summary

⚡ 2 improvements ✅ 13 untouched benchmarks

Benchmarks breakdown

Benchmark main 4662-sql-query-component-doesnt-work Change
test_successful_run_with_input_type_any 275.7 ms 221.1 ms +24.71%
test_successful_run_with_output_type_any 287.8 ms 219.6 ms +31.06%