mirror of
https://github.com/safing/portbase
synced 2025-09-02 02:29:59 +00:00
Merge pull request #142 from safing/fix/runtime-sr-provider
Fix runtime single record provider key check
This commit is contained in:
commit
d717d01197
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ func (sr *singleRecordReader) Set(_ record.Record) (record.Record, error) {
|
||||||
// Get implements ValueProvider.Get and returns the wrapped record.Record
|
// Get implements ValueProvider.Get and returns the wrapped record.Record
|
||||||
// but only if keyOrPrefix exactly matches the records database key.
|
// but only if keyOrPrefix exactly matches the records database key.
|
||||||
func (sr *singleRecordReader) Get(keyOrPrefix string) ([]record.Record, error) {
|
func (sr *singleRecordReader) Get(keyOrPrefix string) ([]record.Record, error) {
|
||||||
if keyOrPrefix != sr.Record.Key() {
|
if keyOrPrefix != sr.Record.DatabaseKey() {
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
return []record.Record{sr.Record}, nil
|
return []record.Record{sr.Record}, nil
|
||||||
|
|
Loading…
Add table
Reference in a new issue