Skip to content
Snippets Groups Projects
Commit f78ab8cf authored by Toufic Batache's avatar Toufic Batache
Browse files

Fix wrong JSON.stringify for budget demand

parent c66cf2cc
Branches
Tags 0.0.747
No related merge requests found
Pipeline #15155 passed
......@@ -787,14 +787,12 @@
}
const variableName = budgetVariableNameByVariableName[budgetVariableName]
const variableConfig: BudgetVariable = budgetVariablesConfig[variableName]
const simulationBody = JSON.stringify(
buildBudgetDemandBody(
const simulationBody = buildBudgetDemandBody(
variableName,
variableConfig.outputVariables,
variableConfig.quantileBaseVariable,
variableConfig.quantileCompareVariables,
false,
),
)
const urlString = "/budgets/demands"
const res = await fetch(urlString, {
......@@ -818,6 +816,16 @@
},
method: "POST",
})
console.log({
displayMode: $displayMode,
email: $requestedSimulationEmail,
request: Object.fromEntries(
Object.entries($parametricReform).filter(([parameterName]) =>
budgetEditableParametersName.has(parameterName),
),
),
simulation: simulationBody,
})
if (!res.ok) {
$requestedSimulationEmail = undefined
console.error(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment