Treat bigint as string
This commit is contained in:
parent
e8e4f064a5
commit
d8f55498ad
|
@ -1886,7 +1886,7 @@ describe.each([
|
|||
[FieldType.INTERNAL]: generator.guid(),
|
||||
[FieldType.BARCODEQR]: generator.guid(),
|
||||
[FieldType.SIGNATURE_SINGLE]: setup.structures.basicAttachment(),
|
||||
[FieldType.BIGINT]: generator.integer(),
|
||||
[FieldType.BIGINT]: generator.integer().toString(),
|
||||
[FieldType.BB_REFERENCE]: [{ _id: config.getUser()._id }],
|
||||
[FieldType.BB_REFERENCE_SINGLE]: { _id: config.getUser()._id },
|
||||
}
|
||||
|
@ -1967,7 +1967,6 @@ describe.each([
|
|||
expectedRowData["attachment_single"].sample,
|
||||
false
|
||||
),
|
||||
bigint: stringified(expectedRowData["bigint"]),
|
||||
boolean: stringified(expectedRowData["boolean"]),
|
||||
json: stringified(expectedRowData["json"]),
|
||||
number: stringified(expectedRowData["number"]),
|
||||
|
|
|
@ -164,7 +164,7 @@ export function parse(rows: Rows, table: Table): Rows {
|
|||
|
||||
const columnSchema = schema[columnName]
|
||||
const { type: columnType } = columnSchema
|
||||
if ([FieldType.NUMBER, FieldType.BIGINT].includes(columnType)) {
|
||||
if ([FieldType.NUMBER].includes(columnType)) {
|
||||
// If provided must be a valid number
|
||||
parsedRow[columnName] = columnData ? Number(columnData) : columnData
|
||||
} else if (
|
||||
|
|
Loading…
Reference in New Issue