Skip to content

Commit

Permalink
fixed download for scenario vs scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsingal committed Dec 21, 2023
1 parent e9504d3 commit b12a2a0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ const AnalysisTable = () => {

const handleDownloadData = useCallback(async () => {
let csv = null;
console.log(currentScenario, scenarioToCompare);
// actual vs scenario
if (!currentScenario && scenarioToCompare) {
csv = await downloadActualVsScenarioData.mutateAsync({
Expand All @@ -217,7 +218,7 @@ const AnalysisTable = () => {
// scenario vs scenario
else if (currentScenario && scenarioToCompare) {
csv = await downloadScenarioVsScenarioData.mutateAsync({
...omit(params, 'page[number]', 'page[size]'),
...omit(params, 'page[number]', 'page[size]', 'scenarioId'),
baseScenarioId: currentScenario,
comparedScenarioId: scenarioToCompare,
});
Expand Down

0 comments on commit b12a2a0

Please sign in to comment.