Skip to content

Commit

Permalink
removed parse check for bigint and int
Browse files Browse the repository at this point in the history
> while inserting big int from console, int will be sent as string
hasura#3667
  • Loading branch information
soorajshankar committed May 21, 2020
1 parent 44c55d2 commit e85c17e
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Endpoints, { globalCookiePolicy } from '../../../../Endpoints';
import requestAction from 'utils/requestAction';
import { Integers, Reals } from '../constants';
import { Reals } from '../constants';

import {
showErrorNotification,
Expand Down Expand Up @@ -39,9 +39,7 @@ const insertItem = (tableName, colValues) => {
Object.keys(colValues).map(colName => {
const colSchema = columns.find(x => x.column_name === colName);
const colType = colSchema.data_type;
if (Integers.indexOf(colType) > 0) {
insertObject[colName] = colValues[colName];
} else if (Reals.indexOf(colType) > 0) {
if (Reals.indexOf(colType) > 0) {
insertObject[colName] =
parseFloat(colValues[colName], 10) || colValues[colName];
} else if (colType === 'boolean') {
Expand Down

0 comments on commit e85c17e

Please sign in to comment.