Skip to content

Commit

Permalink
Avoid repeated nil check
Browse files Browse the repository at this point in the history
  • Loading branch information
tarilabs authored and dhirajsb committed Sep 25, 2023
1 parent ca80c24 commit 0ac30c6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions internal/server/grpc_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package server
import (
"context"
"fmt"

"github.com/opendatahub-io/model-registry/internal/ml_metadata/proto"
"github.com/opendatahub-io/model-registry/internal/model/db"
"google.golang.org/grpc/codes"
Expand Down Expand Up @@ -134,9 +135,6 @@ func (g grpcServer) PutContextType(ctx context.Context, request *proto.PutContex
if err != nil {
return nil, err
}
if err != nil {
return nil, err
}
var typeId = int64(value.ID)
return &proto.PutContextTypeResponse{
TypeId: &typeId,
Expand Down

0 comments on commit 0ac30c6

Please sign in to comment.