fix - ig item.groupes is null default set 'V'
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user