Skip to content

Commit

Permalink
check feature list length
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Gruhler committed Oct 3, 2019
1 parent 48d6718 commit a832f0b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions proxmox/resource_lxc.go
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,10 @@ func resourceLxcRead(d *schema.ResourceData, meta interface{}) error {
d.Set("description", config.Description)

defaultFeatures := d.Get("features").(*schema.Set)
featuresWithDefaults := UpdateDeviceConfDefaults(config.Features, defaultFeatures)
d.Set("features", featuresWithDefaults)
if len(defaultFeatures.List()) > 0 {
featuresWithDefaults := UpdateDeviceConfDefaults(config.Features, defaultFeatures)
d.Set("features", featuresWithDefaults)
}

d.Set("force", config.Force)
d.Set("hookscript", config.Hookscript)
Expand Down

0 comments on commit a832f0b

Please sign in to comment.