fix misplaced _exists check

This commit is contained in:
Travis 2021-02-09 10:49:33 -06:00
parent 8fe1b9a37c
commit bcb71b023a
No known key found for this signature in database
GPG key ID: 37080CC2042BA34E

View file

@ -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,