Merge branch 'master' of github.com:Budibase/budibase into develop

This commit is contained in:
mike12345567 2021-08-04 15:00:50 +01:00
commit 57f46bfdb4
2 changed files with 4 additions and 2 deletions

View File

@ -165,6 +165,10 @@ module External {
if (!row[key] || newRow[key] || field.autocolumn) { if (!row[key] || newRow[key] || field.autocolumn) {
continue continue
} }
// parse floats/numbers
if (field.type === FieldTypes.NUMBER && !isNaN(parseFloat(row[key]))) {
newRow[key] = parseFloat(row[key])
}
// if its not a link then just copy it over // if its not a link then just copy it over
if (field.type !== FieldTypes.LINK) { if (field.type !== FieldTypes.LINK) {
newRow[key] = row[key] newRow[key] = row[key]

View File

@ -19,8 +19,6 @@ function parseBody(body: any) {
} }
if (isIsoDateString(value)) { if (isIsoDateString(value)) {
body[key] = new Date(value) body[key] = new Date(value)
} else if (!isNaN(parseFloat(value))) {
body[key] = parseFloat(value)
} }
} }
return body return body