Skip to content

Commit

Permalink
fix environment
Browse files Browse the repository at this point in the history
  • Loading branch information
maciaszczykm committed Apr 23, 2024
1 parent e679f11 commit 34120ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/resource/infrastructure_stack_model.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func (is *infrastructureStack) From(stack *gqlclient.InfrastructureStackFragment
}

func infrastructureStackFilesFrom(files []*gqlclient.StackFileFragment, d diag.Diagnostics) basetypes.MapValue {
if len(files) == 0 {
if files == nil {
return types.MapNull(types.StringType)
}

Expand Down Expand Up @@ -180,7 +180,7 @@ var InfrastructureStackEnvironmentAttrTypes = map[string]attr.Type{
}

func infrastructureStackEnvironmentsFrom(envs []*gqlclient.StackEnvironmentFragment, ctx context.Context, d diag.Diagnostics) types.Set {
if len(envs) == 0 {
if envs == nil {
return types.SetNull(basetypes.ObjectType{AttrTypes: InfrastructureStackEnvironmentAttrTypes})
}

Expand Down

0 comments on commit 34120ef

Please sign in to comment.