Fix runtime single record provider key check

This commit is contained in:
Daniel 2021-11-09 10:07:02 +01:00
parent b50f922fb5
commit 0dcc397bf3

View file

@ -38,7 +38,7 @@ func (sr *singleRecordReader) Set(_ record.Record) (record.Record, error) {
// Get implements ValueProvider.Get and returns the wrapped record.Record
// but only if keyOrPrefix exactly matches the records database key.
func (sr *singleRecordReader) Get(keyOrPrefix string) ([]record.Record, error) {
if keyOrPrefix != sr.Record.Key() {
if keyOrPrefix != sr.Record.DatabaseKey() {
return nil, nil
}
return []record.Record{sr.Record}, nil