Skip to content

Commit 9f7fd18

Browse files
authored
Fix Project read issue when there are no constraints (#230)
Signed-off-by: Deepak Mettem <[email protected]>
1 parent 8d2bb4e commit 9f7fd18

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

vra/resource_project.go

+4
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,10 @@ func expandProjectConstraints(configProjectConstraints []interface{}) map[string
325325
}
326326

327327
func flattenProjectConstraints(projectConstraints map[string][]models.Constraint) []map[string]interface{} {
328+
if projectConstraints == nil {
329+
return nil
330+
}
331+
328332
result := make([]map[string]interface{}, 0, 1)
329333

330334
helper := make(map[string]interface{})

0 commit comments

Comments
 (0)