diff --git a/templategen/templategen.go b/templategen/templategen.go index 974aefa..40f371b 100644 --- a/templategen/templategen.go +++ b/templategen/templategen.go @@ -7,6 +7,7 @@ import ( "io" "net/http" "os" + "strings" "time" ) @@ -97,6 +98,7 @@ func AmoContactsFieldsToRuMap(data []amo.Contact) []interface{} { func AmoCustomFieldsToMap(data []amo.CustomField) map[string]interface{} { result := map[string]interface{}{} for _, field := range data { + field.FieldName = strings.Replace(field.FieldName, " ", "_", -1) switch len(field.Values) { case 0: result[field.FieldName] = ""