Skip to content

Commit

Permalink
fix(organization): fixes key error when no org is selected (#383)
Browse files Browse the repository at this point in the history
When we login with auth token in silent mode, there's no org selected. The config has no org present either. This breaks the list command that tries to fetch the selected org from config to highlight it in the output.
  • Loading branch information
pallabpain authored Nov 5, 2024
1 parent d370826 commit 29476ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion riocli/organization/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def list_organizations(ctx: click.Context) -> None:
try:
client = new_client(with_project=False)
organizations = client.get_user_organizations()
current = ctx.obj.data["organization_id"]
current = ctx.obj.data.get("organization_id")
print_organizations(organizations, current)
except Exception as e:
click.secho(str(e), fg=Colors.RED)
Expand Down

0 comments on commit 29476ff

Please sign in to comment.