Skip to content

Commit

Permalink
Use f.Value directly instead
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreydwalter committed Apr 29, 2024
1 parent a4d56da commit 6d3ae07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model_table_has_many.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func baseValues(model TableModel, fields []*schema.Field) map[internal.MapKey][]

func modelKey(key []interface{}, strct reflect.Value, fields []*schema.Field) []interface{} {
for _, f := range fields {
key = append(key, getFieldValue(strct.FieldByIndex(f.Index)))
key = append(key, getFieldValue(f.Value(strct)))
}
return key
}
Expand Down

0 comments on commit 6d3ae07

Please sign in to comment.