Skip to content

Commit

Permalink
sdk: fix bug with returning default value from GetOk
Browse files Browse the repository at this point in the history
  • Loading branch information
fairclothjm committed Jun 21, 2024
1 parent 9af5c5c commit dd073b6
Show file tree
Hide file tree
Showing 2 changed files with 1,016 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sdk/framework/field_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func (d *FieldData) GetOk(k string) (interface{}, bool) {
panic(fmt.Sprintf("error reading %s: %s", k, err))
}

if ok && result == nil {
if !ok || result == nil {
result = schema.DefaultOrZero()
}

Expand Down
Loading

0 comments on commit dd073b6

Please sign in to comment.