Skip to content

Commit

Permalink
ICR fix
Browse files Browse the repository at this point in the history
  • Loading branch information
harshil-goel committed May 16, 2024
1 parent 724e4db commit 3ed8fc7
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion worker/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,16 @@ func toType(attr string, update pb.TypeUpdate) *bpb.KV {

func fieldToString(update *pb.SchemaUpdate) string {
var builder strings.Builder
predicate := x.ParseAttr(update.Predicate)
ps := strings.SplitN(update.Predicate, x.NsSeparator, 2)
predicate := ""
var err error
if len(ps) > 1 {
// This is not possible, but can happen by mistake
predicate = ps[1]
} else {
predicate, err = x.AttrFrom2103(update.Predicate)
x.Check(err)
}
x.Check2(builder.WriteString("\t"))
// We don't need the namespace information with the fields. We already have that with type.
if strings.HasPrefix(predicate, "~") {
Expand Down

0 comments on commit 3ed8fc7

Please sign in to comment.