Skip to content

Commit

Permalink
fix: load metadata with data owner
Browse files Browse the repository at this point in the history
  • Loading branch information
mattstweb committed May 19, 2023
1 parent 8c057b2 commit 8db90e3
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 20 deletions.
1 change: 1 addition & 0 deletions proto/sao/sao/query_proposal.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ message QueryProposal {
string gateway = 6;
string commitId = 7;
string version = 8;
string dataOwner = 9;
}
2 changes: 1 addition & 1 deletion x/sao/keeper/grpc_query_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (k Keeper) Metadata(goCtx context.Context, req *types.QueryMetadataRequest)
var dataId string
if proposal.KeywordType > 1 {
model, isFound := k.model.GetModel(ctx, fmt.Sprintf("%s-%s-%s",
proposal.Owner, proposal.Keyword, proposal.GroupId,
proposal.DataOwner, proposal.Keyword, proposal.GroupId,
))
if !isFound {
return nil, status.Errorf(codes.NotFound, "dataId not found by Alias: %s", proposal.Keyword)
Expand Down
90 changes: 71 additions & 19 deletions x/sao/types/query_proposal.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8db90e3

Please sign in to comment.