Skip to content

Commit 3f86917

Browse files
authored
Merge pull request #262 from American-Institutes-for-Research/HEA-990/Unrecognized_wealth_group_foreign_key_TD07-MDJ
Replace case senstive indexing that might fail when the BSS uses diff…
2 parents f5c5b92 + 3f9f640 commit 3f86917

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

pipelines/assets/fixtures.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,11 @@ def validate_instances(
9191
elif model_name == "Community":
9292
instance["natural_key"] = instance["livelihood_zone_baseline"] + [instance["full_name"]]
9393
elif model_name == "WealthGroup":
94+
community = instance.get("community")
9495
instance["natural_key"] = instance["livelihood_zone_baseline"] + [
9596
instance["wealth_group_category"],
96-
instance["full_name"],
97+
# use the actual community full_name rather than the BSS drived one
98+
community[2] if community else "",
9799
]
98100
elif model_name == "LivelihoodStrategy":
99101
instance["natural_key"] = instance["livelihood_zone_baseline"] + [

0 commit comments

Comments
 (0)