Skip to content

Commit 0791a71

Browse files
committed
Ignores country look-up for companies with unknown country code
1 parent da75207 commit 0791a71

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

transformnext/enrich.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package transformnext
33
import (
44
"errors"
55
"fmt"
6+
"log/slog"
67
"sort"
78
"strings"
89

@@ -193,7 +194,7 @@ func (c *Company) partners(srcs map[string]*source, kv *kv) error {
193194
}
194195
p.Pais, err = stringFromKV(srcs, kv, "pai", row[5], 0)
195196
if err != nil {
196-
return fmt.Errorf("could not parse Pais for %s: %w", c.CNPJ, err)
197+
slog.Warn("unknown Pais", "code", row[5], "cnpj", c.CNPJ)
197198
}
198199
p.CPFRepresentanteLegal = row[6]
199200
p.NomeRepresentanteLegal = row[7]

0 commit comments

Comments
 (0)