From bcb71b023a6ed4ca692a8f9a3855e90eb2122f74 Mon Sep 17 00:00:00 2001 From: Travis Date: Tue, 9 Feb 2021 10:49:33 -0600 Subject: [PATCH] fix misplaced _exists check --- holder.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/holder.go b/holder.go index 9ecf673d8..c1d1855e7 100644 --- a/holder.go +++ b/holder.go @@ -891,14 +891,14 @@ func (h *Holder) schema(ctx context.Context, includeViews bool) ([]*IndexInfo, e ShardWidth: ShardWidth, Fields: make([]*FieldInfo, 0, len(index.Fields)), } - for _, field := range index.Fields { + for fieldName, field := range index.Fields { + if fieldName == existenceFieldName { + continue + } cfm, err := h.decodeCreateFieldMessage(field.Data) if err != nil { return nil, errors.Wrap(err, "decoding CreateFieldMessage") } - if cfm.Field == existenceFieldName { - continue - } fi := &FieldInfo{ Name: cfm.Field, CreatedAt: cfm.CreatedAt,