3
0

Revert record value counter change requiring module

The change breaks tests which use the older, "simpler" interface.
This commit is contained in:
Tomaž Jerman
2022-08-02 12:54:17 +02:00
parent 9e1375e99a
commit 9c6edc7fd8

View File

@@ -241,14 +241,16 @@ func (r *Record) CountValues() (pos map[string]uint) {
"ownedBy": 1,
}
if mod == nil {
// count record values
// only when module is known
return
}
// if mod == nil {
// // count record values
// // only when module is known
// return
// }
for _, f := range mod.Fields {
pos[f.Name] = 0
if mod != nil {
for _, f := range mod.Fields {
pos[f.Name] = 0
}
}
for _, val := range r.Values {