Skip to content

Commit e00b95b

Browse files
committed
Preserve pre-2024 ACA target fallbacks
1 parent 030f761 commit e00b95b

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

policyengine_us_data/calibration/unified_matrix_builder.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1695,10 +1695,11 @@ def _load_aca_ptc_factors(
16951695
if suffix.isdigit():
16961696
csv_candidates[int(suffix)] = path
16971697

1698-
eligible_years = [
1699-
year for year in csv_candidates if year <= self.time_period
1700-
] or sorted(csv_candidates)
1701-
csv_path = csv_candidates[max(eligible_years)]
1698+
eligible_years = [year for year in csv_candidates if year <= self.time_period]
1699+
if eligible_years:
1700+
csv_path = csv_candidates[max(eligible_years)]
1701+
else:
1702+
csv_path = csv_candidates[min(csv_candidates)]
17021703
df = pd.read_csv(csv_path)
17031704
result = {}
17041705
for _, row in df.iterrows():

0 commit comments

Comments
 (0)