Skip to content
Snippets Groups Projects
Commit 2a7b9b05 authored by Manuel Spuhler's avatar Manuel Spuhler
Browse files

Formula fix

parent b2743120
Branches feat/formula
No related tags found
No related merge requests found
......@@ -70,9 +70,10 @@ export const experimentInputToData = (data: ExperimentCreateInput) => {
var_name: t.name,
unary_operation: t.operation,
})),
interactions: data.interactions?.map((v) =>
v.reduce((a, e, i) => ({ ...a, [`var${i + 1}`]: e }), {}),
),
interactions:
data.interactions?.map((v) =>
v.reduce((a, e, i) => ({ ...a, [`var${i + 1}`]: e }), {}),
) || [],
}) ||
null;
......@@ -146,8 +147,8 @@ export const dataToExperiment = (data: ExperimentData): Experiment => {
exp.results = data.result
? data.result
.map((result) => dataToResult(result, exp.algorithm.name))
.flat()
.map((result) => dataToResult(result, exp.algorithm.name))
.flat()
: [];
return exp;
......
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