Skip to content

Commit

Permalink
Fix issue with assigning 'parent_id' to projects that was causing tes…
Browse files Browse the repository at this point in the history
…ts to fail
  • Loading branch information
Gavin Williams committed Oct 28, 2020
1 parent fb0fac5 commit 0279dca
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion teamcity/resource_project.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,11 @@ func resourceProjectRead(d *schema.ResourceData, meta interface{}) error {

d.Set("name", dt.Name)
d.Set("description", dt.Description)
d.Set("parent_id", dt.ParentProjectID)
parentProjectID := dt.ParentProjectID
if parentProjectID == "_Root" {
parentProjectID = ""
}
d.Set("parent_id", parentProjectID)

return flattenParameterCollection(d, dt.Parameters)
}
Expand Down

0 comments on commit 0279dca

Please sign in to comment.