Skip to content

Commit

Permalink
Merge branch 'wreeve/team-access' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
wdreeveii committed Dec 3, 2021
2 parents 00a637c + b7b9cbf commit 31ccfbf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions awx/data_source_inventory_role.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func dataSourceInventoryRoleRead(ctx context.Context, d *schema.ResourceData, m
if roleID, okID := d.GetOk("id"); okID {
id := roleID.(int)
for _, v := range roleslist {
if id == v.ID {
if v != nil && id == v.ID {
d = setInventoryRoleData(d, v)
return diags
}
Expand All @@ -87,7 +87,7 @@ func dataSourceInventoryRoleRead(ctx context.Context, d *schema.ResourceData, m
name := roleName.(string)

for _, v := range roleslist {
if name == v.Name {
if v != nil && name == v.Name {
d = setInventoryRoleData(d, v)
return diags
}
Expand Down
4 changes: 2 additions & 2 deletions awx/data_source_project_role.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func dataSourceProjectRolesRead(ctx context.Context, d *schema.ResourceData, m i
if roleID, okID := d.GetOk("id"); okID {
id := roleID.(int)
for _, v := range roleslist {
if id == v.ID {
if v != nil && id == v.ID {
d = setProjectRoleData(d, v)
return diags
}
Expand All @@ -88,7 +88,7 @@ func dataSourceProjectRolesRead(ctx context.Context, d *schema.ResourceData, m i
name := roleName.(string)

for _, v := range roleslist {
if name == v.Name {
if v != nil && name == v.Name {
d = setProjectRoleData(d, v)
return diags
}
Expand Down

0 comments on commit 31ccfbf

Please sign in to comment.