Skip to content

Commit

Permalink
Fix nil private data hash bug
Browse files Browse the repository at this point in the history
  • Loading branch information
bandreghetti committed Jan 20, 2021
1 parent aeceea2 commit a246b2e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions assets/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ func getRecursive(stub shim.ChaincodeStubInterface, pvtCollection, key string) (
if err != nil {
return nil, errors.WrapErrorWithStatus(err, "unable to get asset", 400)
}
if hash == nil {
return nil, errors.NewCCError("asset not found", 404)
}
response := Asset{
"@key": key,
"@assetType": pvtCollection,
Expand Down

0 comments on commit a246b2e

Please sign in to comment.