Skip to content

Commit

Permalink
Revert error behaviour on combined adds/subtracts and formulas (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilwoodruff authored Feb 14, 2024
1 parent 0a5fbf0 commit b8f1367
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
4 changes: 4 additions & 0 deletions changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- bump: minor
changes:
removed:
- Error raising for adds/subtracts properties plus a formula.
9 changes: 0 additions & 9 deletions policyengine_core/variables/variable.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,15 +307,6 @@ def __init__(self, baseline_variable=None):
)
)

if len(self.formulas) != 0 and (
self.adds is not None or self.subtracts is not None
):
raise ValueError(
'Variable "{name}" has a formula and an add or subtract'.format(
name=self.name
)
)

self.is_neutralized = False

# ----- Setters used to build the variable ----- #
Expand Down

0 comments on commit b8f1367

Please sign in to comment.