Skip to content

Commit

Permalink
bug reject influxdb component fixed (#395)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikoteko authored Feb 3, 2024
1 parent d0ff246 commit 48e79c6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions engine/workspaceComponentExecutor/influxdb.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,8 @@ class InfluxdbConnector {
prepareData(data,jsonData,influxDB,org,bucket,measurementType){
let result = {};
try{
if(!(data.specificData && data.specificData.measurement && data.specificData.bucket)){
reject(new Error("Il faut fournir le nom de la mesure te le nom du bucket"))
if(!(data.specificData && data.specificData.measurementInsert && data.specificData.bucketInsert)){
reject(new Error("Il faut fournir le nom de la mesure et le nom du bucket"))
}

const writeApi = influxDB.getWriteApi(org, bucket);
Expand All @@ -358,7 +358,7 @@ class InfluxdbConnector {
}

// when the data given is an array of objects ->>>
if(Array.isArray(jsonData)){
if(Array.isArray(data)){
// gets the fields that weren't entered by the user according to first object?
// we take the first object for the array
const fields = this.getRemainingFields(jsonData[0],inputFields);
Expand Down

0 comments on commit 48e79c6

Please sign in to comment.