Skip to content

Commit

Permalink
Merge pull request #91 from SamparkAI/kaavee/fix_trigger_error
Browse files Browse the repository at this point in the history
Add trigger error
  • Loading branch information
kaavee315 committed Jun 1, 2024
2 parents 3b835e4 + 523ebe0 commit cbfa2a6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion composio/cli/triggers.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ def _enable_trigger(context: Context, id: str) -> None:
"""Enable a trigger for an app"""
context.console.print(f"Enabling trigger [green]{id}[/green]")
try:
(trigger,) = context.client.triggers.get(trigger_ids=[id])
triggers = context.client.triggers.get(trigger_ids=[id])
if len(triggers) == 0:
raise click.ClickException(f"Trigger with ID {id} not found")
trigger = triggers[0]
connected_account = context.client.get_entity().get_connection(
app=trigger.appKey
)
Expand Down

0 comments on commit cbfa2a6

Please sign in to comment.