diff --git a/apps/tag/management/commands/sync_livestock.py b/apps/tag/management/commands/sync_livestock.py index 5146766..84b4aa4 100644 --- a/apps/tag/management/commands/sync_livestock.py +++ b/apps/tag/management/commands/sync_livestock.py @@ -106,7 +106,7 @@ class Command(BaseCommand): birthdate = parse_birthdate(temp.birthdate) gender = 1 if temp.gender == 'M' else 2 livestock_type = livestock_types.get(temp.species) - weight_type = livestock_type.weight_type + weight_type = livestock_type.weight_type if livestock_type else 'L' key = (self.normalize_herd_code(temp.herd_code), birthdate, gender) livestock = livestock_map.get(key)