Remaked test and case for dumping prefixes for exportEvent

This commit is contained in:
porosnicuadrian
2021-07-07 15:50:58 +03:00
committed by Dan Christian Bogos
parent 3e13436e13
commit 5daad44e32
2 changed files with 52 additions and 10 deletions

View File

@@ -64,7 +64,11 @@ func (eeR *ExportRequest) FieldAsInterface(fldPath []string) (val interface{}, e
return nil, fmt.Errorf("unsupported field prefix: <%s>", fldPath[0])
}
}
val, err = dp.FieldAsInterface(fldPath[1:])
if len(fldPath) != 1 {
val, err = dp.FieldAsInterface(fldPath[1:])
} else {
val = dp
}
case utils.MetaUCH:
var ok bool
if val, ok = Cache.Get(utils.CacheUCH, strings.Join(fldPath[1:], utils.NestingSep)); !ok {