Skip to content

Commit

Permalink
DiffFieldReader: filter all '#' fields from sets
Browse files Browse the repository at this point in the history
Now that readMap filters out '#' fields, when maps are nested in sets,
we exposed a related bug where a set was iterating over nested maps and
expected the '#' key to be present in those nested maps.

By skipping _all_ count fields when iterating over set keys, all is
right with the world again.
  • Loading branch information
phinze authored and Yahya Poonawala committed Mar 13, 2015
1 parent 62da019 commit b2e65c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions helper/schema/field_reader_diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ func (r *DiffFieldReader) readSet(
if !strings.HasPrefix(k, prefix) {
continue
}
if strings.HasPrefix(k, prefix+"#") {
// Ignore the count field
if strings.HasSuffix(k, "#") {
// Ignore any count field
continue
}

Expand Down

0 comments on commit b2e65c3

Please sign in to comment.