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

@@ -7,7 +7,7 @@ ENV_NAME=DEV
# Database secrets
DB_HOST=31.7.78.133
DB_PORT=14352
DB_NAME=Production
DB_NAME=Development
DB_USERNAME=postgres
DB_PASSWORD=pfLIVXupbDetvFMt2gUvxLXUL9b4HIOHaPcKXsBEZ1i8zl0iLUjmhUfXlGfJKcTV

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