Skip to content

Commit

Permalink
Switch to calculate_add when claculate_output doesn't work
Browse files Browse the repository at this point in the history
  • Loading branch information
benjello authored and fpagnoux committed Feb 15, 2018
1 parent 7c757aa commit 4bc5af3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion openfisca_core/decompositions.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ def new_test_case_array(holder, array):
node['values'] = values = []
for simulation_index, simulation in enumerate(simulations):
try:
array = simulation.calculate_output(node['code'], simulation.period)
try:
array = simulation.calculate_output(node['code'], simulation.period)
except ValueError:
array = simulation.calculate_add(node['code'], simulation.period)
except parameters.ParameterNotFound as exc:
exc.simulation_index = simulation_index
raise
Expand Down

0 comments on commit 4bc5af3

Please sign in to comment.