fix: Fix api_key missing error when adding a flow in ComposIO + tests (#3432)
* 🐛 (ComposioAPI.py): Fix issue where build_config was not being updated correctly when api_key is not empty * 🐛 (GenericNode/index.tsx): Fix potential null pointer exception by adding non-null assertion operator to info property access ✨ (generalBugs-shard-11.spec.ts): Add end-to-end tests to ensure users can use ComposIO without api_key error and connect tools successfully
This commit is contained in:
parent
886a8c6bed
commit
595746e797
3 changed files with 132 additions and 3 deletions
|
|
@ -147,11 +147,13 @@ class ComposioAPIComponent(LCToolComponent):
|
|||
|
||||
def update_build_config(self, build_config: dict, field_value: Any, field_name: str | None = None) -> dict:
|
||||
if field_name == "api_key":
|
||||
build_config = self._update_app_names_with_connected_status(build_config)
|
||||
if hasattr(self, "api_key") and self.api_key != "":
|
||||
build_config = self._update_app_names_with_connected_status(build_config)
|
||||
return build_config
|
||||
|
||||
if field_name in {"app_names", "auth_status_config"}:
|
||||
build_config["auth_status_config"]["value"] = self._check_for_authorization(self._get_normalized_app_name())
|
||||
if hasattr(self, "api_key") and self.api_key != "":
|
||||
build_config = self._update_app_names_with_connected_status(build_config)
|
||||
|
||||
all_action_names = [action_name for action_name in Action.__annotations__]
|
||||
app_action_names = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue