fix - ig item.groupes is null default set 'V'

This commit is contained in:
2025-11-12 11:46:38 +03:30
parent 212f7a3859
commit 58ac88bde8
3 changed files with 4 additions and 4 deletions

View File

@@ -150,4 +150,4 @@ class RancherViewSet(viewsets.ModelViewSet, DynamicSearchMixin):
else:
return Response({
"message": "rancher has not existence"
}, status=status.HTTP_403_FORBIDDEN)
}, status=status.HTTP_404_NOT_FOUND)

View File

@@ -111,8 +111,8 @@ def rancher_quota_weight(
incentive_plans = list(quota.incentive_assignments.all().select_related('livestock_type'))
# list of rancher herds
herds = rancher.herd.all()
herd_livestock_gropes = [herd.activity for herd in herds]
herd_livestock_gropes = [herd.activity if herd.activity else 'V' for herd in herds]
print(herd_livestock_gropes)
livestock_counts_list, livestock_counts_dict = get_rancher_statistic_by_herd(rancher)
total_weight = 0