OSDN Git Service
(root)
/
bytom
/
bytom-spv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2d5ebde
)
fix nil asset display
author
oysheng
<oysheng@bytom.io>
Thu, 19 Apr 2018 03:06:03 +0000
(11:06 +0800)
committer
oysheng
<oysheng@bytom.io>
Thu, 19 Apr 2018 03:06:03 +0000
(11:06 +0800)
asset/asset.go
patch
|
blob
|
history
diff --git
a/asset/asset.go
b/asset/asset.go
index
cd370b8
..
053d61a
100644
(file)
--- a/
asset/asset.go
+++ b/
asset/asset.go
@@
-301,8
+301,10
@@
func (reg *Registry) GetAsset(id string) (*Asset, error) {
if err := json.Unmarshal(extAsset, asset); err != nil {
return nil, err
}
+ return asset, nil
}
- return asset, nil
+
+ return nil, errors.WithDetailf(ErrFindAsset, "no such asset, assetID: %s", id)
}
// ListAssets returns the accounts in the db