Skip to content

Commit 91fa181

Browse files
author
Michael Smit
committed
BAck out variable_exists bit
1 parent 35b7237 commit 91fa181

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

policyengine/outputs/macro/single/calculate_single_economy.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -293,11 +293,15 @@ def calculate_labor_supply_responses(self):
293293
return result
294294

295295
def _has_behavioral_response(self) -> bool:
296-
return self.simulation.variable_exists(
296+
return (
297297
"employment_income_behavioral_response"
298-
) and any(
299-
self.simulation.calculate("employment_income_behavioral_response")
300-
!= 0
298+
in self.simulation.tax_benefit_system.variables
299+
and any(
300+
self.simulation.calculate(
301+
"employment_income_behavioral_response"
302+
)
303+
!= 0
304+
)
301305
)
302306

303307
def calculate_lsr_working_hours(self):

0 commit comments

Comments
 (0)