Skip to content

Commit 082ede5

Browse files
authored
Merge pull request #221 from American-Institutes-for-Research/HEA-772/end_point_for_baseline_wealthcharactersics
Remove Poultry as a separate characteristic_group - see HEA-772
2 parents ff5639c + 0a48f08 commit 082ede5

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

apps/baseline/serializers.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -426,13 +426,10 @@ def get_wealth_group_label(self, obj):
426426

427427
def get_characteristic_group(self, obj):
428428
"""
429-
Override the default characteristic_group for Livestock and Poultry.
429+
Override the default characteristic_group for Livestock.
430430
431-
This allows us to use the same wealth characteristic, e.g. 'Number owned' for both Livestock and Poultry,
432-
as well as other wealth characteristics.
431+
Allows use of the same label, e.g. 'Number owned' for both Livestock and other wealth characteristics.
433432
"""
434-
if obj.product and obj.product.cpc.startswith("L0215"):
435-
return "Poultry"
436433
if obj.product and obj.product.cpc.startswith("L02"):
437434
return "Livestock"
438435
return obj.wealth_characteristic.characteristic_group
@@ -527,13 +524,10 @@ def get_wealth_group_label(self, obj):
527524

528525
def get_characteristic_group(self, obj):
529526
"""
530-
Override the default characteristic_group for Livestock and Poultry.
527+
Override the default characteristic_group for Livestock.
531528
532-
This allows us to use the same wealth characteristic, e.g. 'Number owned' for both Livestock and Poultry,
533-
as well as other wealth characteristics.
529+
Allows use of the same label, e.g. 'Number owned' for both Livestock and other wealth characteristics.
534530
"""
535-
if obj.product and obj.product.cpc.startswith("L0215"):
536-
return "Poultry"
537531
if obj.product and obj.product.cpc.startswith("L02"):
538532
return "Livestock"
539533
return obj.wealth_characteristic.characteristic_group

0 commit comments

Comments
 (0)