Skip to content

Commit

Permalink
Migrate project related stuff to format_project_table
Browse files Browse the repository at this point in the history
  • Loading branch information
suricactus committed Oct 4, 2024
1 parent ed98778 commit 9b6bb22
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions qfieldcloud_sdk/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,8 @@ def list_projects(ctx: Context, include_public: bool, **opts) -> None:
print_json(projects)
else:
if projects:
log("Projects:")
for project in projects:
log(f'{project["id"]}\t{project["owner"]}/{project["name"]}')
log("Projects the current user has access to:")
log(format_project_table(projects))
else:
log("User does not have any projects yet.")

Expand Down Expand Up @@ -258,9 +257,8 @@ def create_project(ctx: Context, name, owner, description, is_public):
if ctx.obj["format_json"]:
print_json(project)
else:
log(
f'Created project "{project["owner"]}/{project["name"]}" with project id "{project["id"]}".'
)
log("Created project:")
log(format_project_table([project]))


@cli.command()
Expand Down

0 comments on commit 9b6bb22

Please sign in to comment.