Skip to content

Commit

Permalink
Fix typing issues #511
Browse files Browse the repository at this point in the history
  • Loading branch information
loafoe committed Jul 14, 2023
1 parent 767de5b commit 57cc5ed
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion cloudfoundry/structures_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,16 @@ func ResourceDataToAppDeployV3(d *schema.ResourceData) (v3appdeployers.AppDeploy
Labels: map[string]types.NullString{},
}
for labelKey, label := range labels {
metadata.Labels[labelKey] = label.(types.NullString)
switch label.(type) {
case types.NullString:
metadata.Labels[labelKey] = label.(types.NullString)
case string:
str := label.(string)
metadata.Labels[labelKey] = types.NullString{
Value: str,
IsSet: true,
}
}
}

stateAsk := v3Constants.ApplicationStarted
Expand Down

0 comments on commit 57cc5ed

Please sign in to comment.