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

[QI2-989] Minimise member ID logging #279

Merged
merged 2 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
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
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