Skip to content

Commit

Permalink
Merge pull request #373 from Juniper/bug/372-nil-attribute-crash
Browse files Browse the repository at this point in the history
Fix crash in data source `apstra_datacenter_system` when performing by-id lookup
  • Loading branch information
chrismarget-j authored Sep 28, 2023
2 parents 7c9dea9 + ad4b903 commit f2a5e2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apstra/data_source_datacenter_system.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (o *dataSourceDatacenterSystemNode) Read(ctx context.Context, req datasourc

// if the user supplied "id", then "name" will be null. Fill it in.
if config.Name.IsNull() {
config.Name = config.Attributes.Attributes()["name"].(basetypes.StringValue)
config.Name = config.Attributes.Attributes()["label"].(basetypes.StringValue)
}

// if the user supplied "name", then "id" will be null. Fill it in.
Expand Down

0 comments on commit f2a5e2c

Please sign in to comment.