From 858af1231b92e8a85ada6a6cbd1f21a24a1a3539 Mon Sep 17 00:00:00 2001 From: Mojtaba-z Date: Tue, 10 Feb 2026 12:53:56 +0330 Subject: [PATCH] fix --> livestock type none on sync_livestock --- apps/tag/management/commands/sync_livestock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)