Skip to content

Commit

Permalink
[WIP] helper/schema: Don't run StateFunc if value is computed
Browse files Browse the repository at this point in the history
Should fix #3076 but I need to add some tests. :)
  • Loading branch information
phinze committed Jun 16, 2016
1 parent f65a898 commit f19686b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions helper/schema/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -959,8 +959,8 @@ func (m schemaMap) diffString(
all bool) error {
var originalN interface{}
var os, ns string
o, n, _, _ := d.diffChange(k)
if schema.StateFunc != nil && n != nil {
o, n, _, computed := d.diffChange(k)
if schema.StateFunc != nil && n != nil && !computed {
originalN = n
n = schema.StateFunc(n)
}
Expand Down

0 comments on commit f19686b

Please sign in to comment.