Skip to content

Commit

Permalink
fix chooseProject function in project init command (#32)
Browse files Browse the repository at this point in the history
filter projects with setup success status when listing
  • Loading branch information
98sean98 authored Aug 31, 2023
1 parent c86fa69 commit d431b0a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion command/project/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,11 @@ func findProject(ctx context.Context, client project.Client, username string, pr

func chooseProject(ctx context.Context, client project.Client, username string) (project generated.ProjectFragment, err error) {

projects, err := client.List(ctx, generated.AccountWhereUniqueInput{Username: &username}, nil)
status := generated.ProjectStatusSetupSuccess

projects, err := client.List(ctx,
generated.AccountWhereUniqueInput{Username: &username},
&generated.ProjectWhereInput{Status: &generated.EnumProjectStatusFilter{Equals: &status}})
if err != nil {
return project, err
}
Expand Down

0 comments on commit d431b0a

Please # to comment.