Skip to content
This repository has been archived by the owner on Aug 16, 2022. It is now read-only.

Commit

Permalink
fix: import dataset from google sheet bug (#23)
Browse files Browse the repository at this point in the history
Co-authored-by: Ya Ka <eng.ymk@gmail.com>
Co-authored-by: HideBa <49897538+HideBa@users.noreply.github.com>
  • Loading branch information
3 people committed Jul 14, 2021
1 parent a2059e9 commit 077558c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/dataset/csvparser.go
Expand Up @@ -5,6 +5,7 @@ import (
"errors"
"io"
"strconv"
"strings"

"github.com/reearth/reearth-backend/pkg/id"
)
Expand Down Expand Up @@ -87,7 +88,7 @@ func (p *DatasetCSVParser) GuessSchema(sid id.SceneID) error {
if h == "lng" {
haslng = true
}
if h != "lng" && h != "lat" {
if h != "lng" && h != "lat" && strings.TrimSpace(h) != "" {
t := p.getRecord(p.firstline[k]).Type()
field, _ := NewSchemaField().NewID().Name(h).Type(t).Build()
schemafields = append(schemafields, field)
Expand Down

0 comments on commit 077558c

Please sign in to comment.