Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to calculate_add when claculate_output doesn't work #611

Merged
merged 2 commits into from
Feb 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 21.3.2 [#617](https://github.com/openfisca/openfisca-core/pull/611)

- Make decompositions more robust

## 21.3.1 [#617](https://github.com/openfisca/openfisca-core/pull/617)

- Fix bug on API `/variable/{id}`
Expand Down
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
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup(
name = 'OpenFisca-Core',
version = '21.3.1',
version = '21.3.2',
author = 'OpenFisca Team',
author_email = 'contact@openfisca.fr',
classifiers = [
Expand Down