Removing try catch wrap.
This commit is contained in:
parent
52d8d7d1dc
commit
e7f42a0075
|
@ -119,23 +119,19 @@ export function areRESTVariablesValid(datasource: Datasource) {
|
|||
}
|
||||
|
||||
export function checkDatasourceTypes(schema: Integration, config: any) {
|
||||
try {
|
||||
for (let key of Object.keys(config)) {
|
||||
if (!schema.datasource?.[key]) {
|
||||
continue
|
||||
}
|
||||
const type = schema.datasource[key].type
|
||||
if (
|
||||
type === DatasourceFieldType.NUMBER &&
|
||||
typeof config[key] === "string"
|
||||
) {
|
||||
config[key] = parseFloat(config[key])
|
||||
}
|
||||
for (let key of Object.keys(config)) {
|
||||
if (!schema.datasource?.[key]) {
|
||||
continue
|
||||
}
|
||||
const type = schema.datasource[key].type
|
||||
if (
|
||||
type === DatasourceFieldType.NUMBER &&
|
||||
typeof config[key] === "string"
|
||||
) {
|
||||
config[key] = parseFloat(config[key])
|
||||
}
|
||||
return config
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
return config
|
||||
}
|
||||
|
||||
async function enrichDatasourceWithValues(
|
||||
|
|
Loading…
Reference in New Issue