Skip to content

Commit

Permalink
datastore: revert usage of BackedHas since BoltDB mechanics are diff
Browse files Browse the repository at this point in the history
  • Loading branch information
postables committed Jun 30, 2019
1 parent 625ef26 commit 8b4abd9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion datastore.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ func (d *Datastore) Get(key datastore.Key) ([]byte, error) {

// Has returns whether the key is present in our datastore
func (d *Datastore) Has(key datastore.Key) (bool, error) {
return datastore.GetBackedHas(d, key)
data, err := d.Get(key)
if err != nil {
return false, err
}
return data != nil, nil
}

// GetSize returns the size of the value referenced by key
Expand Down

0 comments on commit 8b4abd9

Please sign in to comment.