Skip to content

Commit

Permalink
fix potential nil pointer dereference
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismarget-j committed May 24, 2024
1 parent 25c8ff9 commit 721f9c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apstra/blueprint/datacenter_generic_system_link.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func (o *DatacenterGenericSystemLink) loadApiData(ctx context.Context, in *apstr
switchEndpoint := in.OppositeEndpointBySystemId(genericSystemId)

o.TargetSwitchId = types.StringValue(switchEndpoint.System.Id.String())
o.TargetSwitchIfName = types.StringValue(*switchEndpoint.Interface.IfName)
o.TargetSwitchIfName = types.StringPointerValue(switchEndpoint.Interface.IfName)
o.GroupLabel = types.StringValue(in.GroupLabel)
o.LagMode = utils.StringValueOrNull(ctx, switchEndpoint.Interface.LagMode.String(), diags)
o.Tags = utils.SetValueOrNull(ctx, types.StringType, in.TagLabels, diags)
Expand Down

0 comments on commit 721f9c0

Please sign in to comment.