mirror of
https://github.com/gojp/goreportcard.git
synced 2026-01-28 22:39:05 +08:00
fix error when badger could not find recent repos key
This commit is contained in:
@@ -156,7 +156,7 @@ type recentItem struct {
|
||||
func updateRecentlyViewed(txn *badger.Txn, repo string) error {
|
||||
var recent []recentItem
|
||||
item, err := txn.Get([]byte("recent"))
|
||||
if err != nil {
|
||||
if err != nil && err != badger.ErrKeyNotFound {
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user