Skip to content

Commit

Permalink
fix(list peer datasets): fix to make listing peer datasets work
Browse files Browse the repository at this point in the history
this is a hack-fix for now because in the long run we're hoping to get away from the net/rpc package that's causing these problems in the first place (hoping to replace with gRPC).
  • Loading branch information
b5 committed Jun 15, 2018
1 parent 633da94 commit f1df720
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/datasets.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,16 @@ func (r *DatasetRequests) List(p *ListParams, res *[]repo.DatasetRef) error {
Limit: p.Limit,
Offset: p.Offset,
})
*res = replies
if err != nil {
err = fmt.Errorf("error requesting dataset list: %s", err.Error())
}
// TODO - for now we're removing schemas b/c they don't serialize properly over RPC
for _, rep := range replies {
if rep.Dataset.Structure != nil {
rep.Dataset.Structure.Schema = nil
}
}
*res = replies
return err
}

Expand Down

0 comments on commit f1df720

Please sign in to comment.