Skip to content

Commit

Permalink
fix(Project): Map string to null for updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaunEgan committed Aug 2, 2021
1 parent 2bc0605 commit be14837
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion projects.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,12 @@ func (p *ProjectApi) UpdateProject(ctx context.Context, name string, project *Pr

body := &UpdateProjectRequest{
Framework: project.Framework,
RootDirectory: &project.RootDirectory,
}

if project.RootDirectory != "" {
body.RootDirectory = &project.RootDirectory
}

payload, err := json.Marshal(body)
if err != nil {
return nil, err
Expand Down

0 comments on commit be14837

Please sign in to comment.