@@ -435,17 +435,13 @@ func mapFields(runnerResp *intake.IntakeRunnerResponse, model *Model, region str
435435 model .Labels = labels
436436 }
437437
438- if runnerResp .Id != nil && * runnerResp .Id == "" {
438+ if runnerResp .Id != nil || * runnerResp .Id == "" {
439439 model .RunnerId = types .StringNull ()
440440 } else {
441441 model .RunnerId = types .StringPointerValue (runnerResp .Id )
442442 }
443443 model .Name = types .StringPointerValue (runnerResp .DisplayName )
444- if runnerResp .Description == nil {
445- model .Description = types .StringValue ("" )
446- } else {
447- model .Description = types .StringPointerValue (runnerResp .Description )
448- }
444+ model .Description = types .StringPointerValue (runnerResp .Description )
449445 model .Region = types .StringValue (region )
450446 model .MaxMessageSizeKiB = types .Int64PointerValue (runnerResp .MaxMessageSizeKiB )
451447 model .MaxMessagesPerHour = types .Int64PointerValue (runnerResp .MaxMessagesPerHour )
@@ -498,7 +494,7 @@ func toUpdatePayload(model, state *Model) (*intake.UpdateIntakeRunnerPayload, er
498494 payload .Description = conversion .StringValueToPointer (model .Description )
499495
500496 var labels map [string ]string
501- if ! model .Labels .IsUnknown () && ! model .Labels .IsNull () {
497+ if ! model .Labels .IsNull () && ! model .Labels .IsUnknown () {
502498 diags := model .Labels .ElementsAs (context .Background (), & labels , false )
503499 if diags .HasError () {
504500 return nil , fmt .Errorf ("failed to convert labels: %w" , core .DiagsToError (diags ))
0 commit comments