This commit is contained in:
Jan Prochazka
2020-11-01 15:52:31 +01:00
parent 229f0ea9c1
commit 0d2120e96b
2 changed files with 8 additions and 7 deletions

View File

@@ -142,6 +142,7 @@ function runTramsformData(
if (cols && !columns) { if (cols && !columns) {
columns = cols.map((columnName) => ({ columnName })); columns = cols.map((columnName) => ({ columnName }));
} }
columns = _.uniqBy(columns, 'columnName');
if (!preview) { if (!preview) {
rows = removePreviewRowFlags(rows); rows = removePreviewRowFlags(rows);
} }

View File

@@ -206,12 +206,12 @@ const resultRows = rows.map((row, rowIndex) => {
}; };
const fields = { const fields = {
year: mom.year(), [args.year]: mom.year(),
month: mom.month() + 1, [args.month]: mom.month() + 1,
day: mom.day(), [args.day]: mom.day(),
hour: mom.hour(), [args.hour]: mom.hour(),
minute: mom.minute(), [args.minute]: mom.minute(),
second: mom.second(), [args.second]: mom.second(),
}; };
return { return {