Skip to content

Commit 3f9f640

Browse files
committed
Replace case senstive indexing that might fail when the BSS uses different case in the communiy names see HEA-990
1 parent 3226735 commit 3f9f640

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)