diff --git a/.env.local b/.env.local index 63983c1..4ff1bc4 100644 --- a/.env.local +++ b/.env.local @@ -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 diff --git a/apps/herd/pos/api/v1/api.py b/apps/herd/pos/api/v1/api.py index 03e0366..4938522 100644 --- a/apps/herd/pos/api/v1/api.py +++ b/apps/herd/pos/api/v1/api.py @@ -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) diff --git a/apps/herd/services/services.py b/apps/herd/services/services.py index cdef63c..97c44e0 100644 --- a/apps/herd/services/services.py +++ b/apps/herd/services/services.py @@ -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