Skip to content

Commit

Permalink
fix: convert TTL to int instead of *int
Browse files Browse the repository at this point in the history
Fixes a conversion error when updating a record.
  • Loading branch information
timohirt committed Sep 3, 2020
1 parent 9fd7fb5 commit 31efb57
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hetznerdns/resource_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ func resourceRecordUpdate(d *schema.ResourceData, m interface{}) error {
record.TTL = nil
ttl, ttlNonEmpty := d.GetOk("ttl")
if ttlNonEmpty {
record.TTL = ttl.(*int)
ttl := ttl.(int)
record.TTL = &ttl
}
record.Type = d.Get("type").(string)
record.Value = d.Get("value").(string)
Expand Down

0 comments on commit 31efb57

Please sign in to comment.