Skip to content

Commit

Permalink
[QI2-989] Minimised member ID logging
Browse files Browse the repository at this point in the history
  • Loading branch information
eliasKA committed Aug 21, 2024
1 parent 8987e9c commit 27f6eff
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions quantuminspire/cli/command_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ def login(
tokens = auth_session.poll_for_tokens()
settings.store_tokens(host_url, tokens)
typer.echo("Login successful!")
typer.echo(f"Using member ID {settings.auths[host].team_member_id}")


@app.command("logout")
Expand Down
2 changes: 0 additions & 2 deletions quantuminspire/util/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ async def _fetch_team_member_id(host: str, access_token: str) -> int:
members = members_page.items
if len(members) == 1:
member_id = members[0].id
typer.echo(f"Using member ID {member_id}")
return cast(int, member_id)

typer.echo("Choose a member ID from the list for project configuration.")
Expand All @@ -191,7 +190,6 @@ async def _fetch_team_member_id(host: str, access_token: str) -> int:
member_id = int(input("Please enter one of the given ids: "))
if member_id not in member_ids:
raise ValueError
typer.echo(f"Using member ID {member_id}")
return cast(int, member_id)
except ValueError:
typer.echo("Invalid input. Please enter a valid id or CTRL + C to cancel.")
Expand Down

0 comments on commit 27f6eff

Please sign in to comment.