Skip to content
Snippets Groups Projects
Commit 8174bb11 authored by Steve Reis's avatar Steve Reis
Browse files

Merge branch 'develop' into 'beta'

Fix issue with csv connector

See merge request sibmip/gateway!38
parents 5aa781dc 7f8f76d2
No related branches found
No related tags found
No related merge requests found
......@@ -79,7 +79,7 @@ export default class CSVService implements IEngineService {
const rows = data
.split('\r\n')
.map((row) => row.split('\t').filter((i) => i))
.filter((row) => row.length >= 2);
.filter((row) => row.length >= 1);
rows.shift(); // remove headers
......@@ -88,6 +88,7 @@ export default class CSVService implements IEngineService {
const rootGroup: Group = {
id: 'Global group',
groups: [],
variables: [],
};
rows.forEach((row) => {
......@@ -100,6 +101,11 @@ export default class CSVService implements IEngineService {
if (!vars.find((v) => v.id === variable.id)) vars.push(variable); // avoid duplicate
if (row.length < 1) {
rootGroup.variables.push(variable.id);
return;
}
let pathId = '';
row.forEach((group, i) => {
......
File moved
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment