Skip to content

Commit

Permalink
Fixed lint
Browse files Browse the repository at this point in the history
  • Loading branch information
harshil-goel committed Apr 5, 2024
1 parent 2472a47 commit 56b3f8a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions worker/mutation.go
Original file line number Diff line number Diff line change
Expand Up @@ -543,9 +543,10 @@ func ValidateAndConvert(edge *pb.DirectedEdge, su *pb.SchemaUpdate) error {
x.ParseAttr(edge.Attr), edge)

case schemaType == types.TypeID(pb.Posting_VFLOAT):
if !(storageType == types.TypeID(pb.Posting_DEFAULT) || storageType == types.TypeID(pb.Posting_STRING) || storageType == types.TypeID(pb.Posting_VFLOAT)) {
return errors.Errorf("Input for predicate %q of type vector is not vector. Did you forget to add quotes before []?. Edge: %v",
x.ParseAttr(edge.Attr), edge)
if !(storageType == types.TypeID(pb.Posting_VFLOAT) || storageType == types.TypeID(pb.Posting_STRING) ||
storageType == types.TypeID(pb.Posting_DEFAULT)) {
return errors.Errorf("Input for predicate %q of type vector is not vector."+
" Did you forget to add quotes before []?. Edge: %v", x.ParseAttr(edge.Attr), edge)
}

// The suggested storage type matches the schema, OK! (Nothing to do ...)
Expand Down

0 comments on commit 56b3f8a

Please sign in to comment.