Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix action filter via slug #574

Merged
merged 2 commits into from
Sep 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions python/composio/client/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,7 @@ def get( # type: ignore
response_json = response.json()
items = [self.model(**action) for action in response_json.get("items")]
if len(actions) > 0:
required = [t.cast(Action, action).name for action in actions]
required = [t.cast(Action, action).slug for action in actions]
items = [item for item in items if item.name in required]

if len(tags) > 0:
Expand Down Expand Up @@ -1054,7 +1054,7 @@ def execute(

return self._raise_if_required(
self.client.http.post(
url=str(self.endpoint / action.name / "execute"),
url=str(self.endpoint / action.slug / "execute"),
json={
"connectedAccountId": connected_account,
"input": modified_params,
Expand Down
Loading