From 1f4f9919d77a410eb56fa33a66670d3682960497 Mon Sep 17 00:00:00 2001 From: Chris Marget Date: Sun, 20 Oct 2024 09:29:31 -0400 Subject: [PATCH] remove redundant `plan.GetSystemAttributes()` call --- apstra/resource_datacenter_device_allocation.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/apstra/resource_datacenter_device_allocation.go b/apstra/resource_datacenter_device_allocation.go index 99b2dbf4..ff9fa12c 100644 --- a/apstra/resource_datacenter_device_allocation.go +++ b/apstra/resource_datacenter_device_allocation.go @@ -308,14 +308,11 @@ func (o *resourceDeviceAllocation) Update(ctx context.Context, req resource.Upda return } - // read back any apstra-assigned attributes + // read back any apstra-assigned attributes; copy them to the state plan.GetSystemAttributes(ctx, bp, &resp.Diagnostics) if resp.Diagnostics.HasError() { return } - - // read and save any apstra-assigned values - plan.GetSystemAttributes(ctx, bp, &resp.Diagnostics) state.SystemAttributes = plan.SystemAttributes // copy the deploy mode to the deprecated root-level attribute