fix - ig item.groupes is null default set 'V'
This commit is contained in:
@@ -7,7 +7,7 @@ ENV_NAME=DEV
|
|||||||
# Database secrets
|
# Database secrets
|
||||||
DB_HOST=31.7.78.133
|
DB_HOST=31.7.78.133
|
||||||
DB_PORT=14352
|
DB_PORT=14352
|
||||||
DB_NAME=Production
|
DB_NAME=Development
|
||||||
DB_USERNAME=postgres
|
DB_USERNAME=postgres
|
||||||
DB_PASSWORD=pfLIVXupbDetvFMt2gUvxLXUL9b4HIOHaPcKXsBEZ1i8zl0iLUjmhUfXlGfJKcTV
|
DB_PASSWORD=pfLIVXupbDetvFMt2gUvxLXUL9b4HIOHaPcKXsBEZ1i8zl0iLUjmhUfXlGfJKcTV
|
||||||
|
|
||||||
|
|||||||
@@ -150,4 +150,4 @@ class RancherViewSet(viewsets.ModelViewSet, DynamicSearchMixin):
|
|||||||
else:
|
else:
|
||||||
return Response({
|
return Response({
|
||||||
"message": "rancher has not existence"
|
"message": "rancher has not existence"
|
||||||
}, status=status.HTTP_403_FORBIDDEN)
|
}, status=status.HTTP_404_NOT_FOUND)
|
||||||
|
|||||||
@@ -111,8 +111,8 @@ def rancher_quota_weight(
|
|||||||
incentive_plans = list(quota.incentive_assignments.all().select_related('livestock_type'))
|
incentive_plans = list(quota.incentive_assignments.all().select_related('livestock_type'))
|
||||||
# list of rancher herds
|
# list of rancher herds
|
||||||
herds = rancher.herd.all()
|
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)
|
livestock_counts_list, livestock_counts_dict = get_rancher_statistic_by_herd(rancher)
|
||||||
|
|
||||||
total_weight = 0
|
total_weight = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user